Check Update一直提示Connection failed. Please check your network connection and try again,開始以為是由於G*W在搗亂,但是打開VPN后還是無法更新,然后開始Google了一下找到了下面的解決辦法。
1、Mac OSX
首先打開Finder在左邊選擇Application目錄,在右邊找到Android Studio.app,然后右擊選擇“顯示包內容”如下圖:
然后找到 Contents/bin/ 目錄下的 .vmoptions 后綴的文件
2、Linux
找到 bin/ 目錄下的 studio.vmoptions (32位系統) 或者 studio64.vmoptions (64位系統)文件
3、Windows
找到 bin/ 目錄下的 studio.vmoptions (32位系統) 或者 studio64.exe.vmoptions (64位系統)文件
接着用編輯器打開 idea.vmoptions 或者 studio.vmoptions/studio64.vmoptions 或者 studio.exe.vmoptions/studio64.exe.vmoptions 文件添加如下內容:
-Djava.net.preferIPv4Stack=true
-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml
-Didea.patches.url=http://dl.google.com/android/studio/patches/
保存后,重新打開Android Studio點擊Check Update就會彈出更新信息提示了
如果仍然無效,將url里的修改http為https,然后重啟點擊Check Update試試~~~
注:自己修改過本機host后可能有問題!
ps:http://www.inferjay.com/blog/2014/12/26/update-android-studio-fail/?utm_source=tuicool