Android Studio 更新后,Gradle 项目刷新失败 [英] Gradle project refresh failed after Android Studio update
问题描述
输出如下:
上午 11:57:04 Gradle 'KeddreaderProject' 项目刷新失败:原因:org.gradle.internal.service.ServiceLocator.([Ljava/lang/ClassLoader;)V:
11:57:04 AM Gradle 'KeddreaderProject' project refresh failed: Cause: org.gradle.internal.service.ServiceLocator.([Ljava/lang/ClassLoader;)V:
我尝试删除 .gradle 文件夹,但没有帮助.可能是什么问题?
I've tried to remove .gradle folder, but it doesn't help. What can be the problem?
即使我尝试在 Ubuntu 13.10 上导入任何其他项目,我也会收到此错误.但是在 Windows 上一切正常(使用相同版本的 Android Studio).
I get this error even when I try to import any other project on Ubuntu 13.10. But on Windows everything works (with the the same version of Android Studio) well.
推荐答案
大多数人不看评论所以总结一下(感谢@Industrial-antidepressant 和@wrecker):
Most people do not read the comments so to summarize (Thanks to @Industrial-antidepressant and @wrecker):
正如错误票中所建议的,您应该尝试以下:
As suggested in a bug ticket you should try the following:
- 关闭 Android Studio
- 去
android-studio/plugins/gradle/lib
- 删除(或更好地将它们移动到某个地方以进行备份)所有
gradle-*-1.8
文件 - 再次启动 Android Studio 并重建/刷新.
它应该可以工作.请务必在上面的错误票上加注星标以获取通知.
It should work. Make sure to star the above bug ticket to get informed.
小提示:尝试新的编译设置 Settings -> Compiler -> Gradle 并激活第三个进程内构建以加快速度.根据您的项目设置,您可能还想选择第一个.有了这个,我的项目构建时间减少到 2-4 秒(在 20+ 秒之前).
Little tip: Try the new compile setting Settings -> Compiler -> Gradle and activate the third in-process build for a speed up. Depending on your project setting you might want to select the first one as well. With that my project build time reduced to 2-4 seconds (before 20+ seconds).
这篇关于Android Studio 更新后,Gradle 项目刷新失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!