Gradle 'AppName' project refresh failed

非 Y 不嫁゛ 提交于 2020-01-17 05:22:42

问题


I have problem related android studio.I updated android studio to 2.1.2.Now when i open previous project in android studio i have error that project refresh failed.

Error:Could not download gradle-core.jar (com.android.tools.build:gradle-core:1.1.0): No cached version available for offline mode


回答1:


You should turn off Offline Mode by doing the following:

  1. Press Command + Shift (or Ctrl + Shift if you're on Windows) simultaneously to bring up Android Studio's Action Navigation.
  2. Type in offline work.
  3. Click on one of the search results that says "Offline work".
  4. You should see the Preferences window be brought up and highlighted at the "Offline work" check box.
  5. Uncheck the check box.
  6. Rebuild your project.

The rebuilding process might take a while since Android Studio will now download a copy of Gradle to your local machine. Rest assured this would only happen once.

After the build completed, it is possible to turn Offline Mode back on again.

p.s., Obviously, you will have to be connected to the internet before following those steps above.



来源:https://stackoverflow.com/questions/38712509/gradle-appname-project-refresh-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!