Android Studio Gradle无法正常工作 [英] Android Studio Gradle not working
本文介绍了Android Studio Gradle无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试了很多不同的解决方案,但没有一个能够正常工作,但仍然出现错误
$ b
Gradle'MyApplication'项目刷新失败
错误:错误:无法为com.android.tools.build:gradle:0.12.+提供离线模式的缓存版本列表。
我试过了:
卸载/安装android studio
从用户目录
中删除.gradle文件夹将0.12更改为1.12。在gradle属性中
启用在gradle设置中使用本地gradle分发。
任何建议如何解决这个问题。
我也尝试过在stackoverflow中提到的各种解决方案,但它们都没有工作。
解决了这个问题,请按照以下步骤操作
$ b
- 在设置窗口中转到File-> Settings,选择Gradle并在Globle Gradle Settings下取消选中 复选框并点击应用& 确定。
- 执行Gradle同步或重新启动IDE。
- 一旦Gradle构建成功,可以再次检查脱机工作 / li>
I tried lot of different solutions but none of them is working and still getting error
Gradle 'MyApplication' project refresh failed
Error:Error:No cached version listing for com.android.tools.build:gradle:0.12.+ available for offline mode.
I tried:
Uninstall/install android studio
Remove .gradle folder from user directory
Change 0.12 to 1.12. in gradle properties
Enable Use local gradle distribution in gradle settings.
any suggestions how can I fix this.
I also tried various solutions mentioned in stackoverflow but none of them is working.
解决方案
Fixed the issue, please follow these steps
- Goto "File->Settings" in the settings window choose "Gradle" and under the "Globle Gradle Settings" unchecked the "offline work" check box and click "Apply" & "ok".
- Do Gradle sync or restart the IDE.
- Once Gradle build is success, can check the "offline work" again.
这篇关于Android Studio Gradle无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文