在Google I/O 13里,Google推出了Android Studio。本來這個東西還是挺好的,但是bug滿天飛,大部分人嘗試裝了一下后連編譯都過不了,各種解釋不通的錯誤。除了花大量時間搜stack overflow找臨時解決辦法外,最靠譜的就是等這個工具升級了。 可是由于google在國內(nèi)的路由可能配置有點問題,每次點Check for update都會出現(xiàn)"Connection failed. Please check your network connection and try again." 這不是一個大坑嗎?下面是解決辦法。 Win版修改\bin\studio.exe.vmoptions,添加兩行 -Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml -Didea.patches.url=http://dl.google.com/android/studio/patches/ Mac和Linux版可以直接修改環(huán)境變量 $ bin/studio"$ export REQUIRED_JVM_ARGS="-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml -Didea.patches.url=http://dl.google.com/android/studio/patches/" ==================================================== It fails to connect when updating Android Studio in the Chinese network. Here is the solution: For Windows version, append the following two lines to the file "\bin\studio.exe.vmoptions" -Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml -Didea.patches.url=http://dl.google.com/android/studio/patches/ For Mac OSX or Linux versions, directly modify the environment variables $ export REQUIRED_JVM_ARGS="-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml -Didea.patches.url=http://dl.google.com/android/studio/patches/" $ bin/studio
[1] https://code.google.com/p/android/issues/detail?id=56068 如果不成功: 參考評論1 分別在windows上和mac上嘗試了一下以上方法,發(fā)現(xiàn)win64系統(tǒng)必須修改\bin\studio64.exe.vmoptions文件方可;而mac上按以上方法依舊不行,后來發(fā)現(xiàn)在/Applications/Android Studio.app/bin/idea.vmoptions文件中內(nèi)容添加如windows上的內(nèi)容時成功。 |
|