在Google I/O 13里,Google推出了Android Studio。本来这个东西还是挺好的,但是bug满天飞,大部分人尝试装了一下后连编译都过不了,各种解释不通的错误。除了花大量时间搜stack overflow找临时解决办法外,最靠谱的就是等这个工具升级了。 可是由于google在国内的路由可能配置有点问题,每次点Check for update都会出现"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版可以直接修改环境变量 $ 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上尝试了一下以上方法,发现win64系统必须修改\bin\studio64.exe.vmoptions文件方可;而mac上按以上方法依旧不行,后来发现在/Applications/Android Studio.app/bin/idea.vmoptions文件中内容添加如windows上的内容时成功。 |
|
来自: joy_chen > 《android_studio》