您的位置:首页 > 移动开发 > Android开发

解决Android Studio更新错误

2015-11-28 22:04 871 查看

在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

Reference:

https://code.google.com/p/android/issues/detail?id=56068

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  AndroidStudio