Gradle'AppName'项目刷新失败 [英] Gradle 'AppName' project refresh failed

查看:206
本文介绍了Gradle'AppName'项目刷新失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题相关的android studio.I更新了android studio到2.1.2。现在,当我在android studio中打开以前的项目时,我有错误的项目刷新失败。 >

错误:无法下载gradle-core.jar(com.android.tools.build:gradle-core:1.1.0):没有可用于离线模式的缓存版本


解决方案

您应该通过执行以下操作关闭离线模式:


  1. 命令 + Shift (或 Ctrl + Shift 如果你在Windows上)同时启动Android Studio的动作导航
  2. 单击其中一个显示离线工作的搜索结果。

  3. 您应该看到首选项窗口被启用并且在离线工作中突出显示
  4. 取消选中复选框。

  5. 重新构建您的项目。

重建过程可能需要一段时间,因为Android Studio现在会将Gradle的副本下载到本地计算机。请放心,这样做只会发生一次。



完成构建后,可以重新打开离线模式。



ps ,显然,您必须先按照上述步骤连接到互联网。


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

解决方案

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.

这篇关于Gradle'AppName'项目刷新失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆