运行android:Gradle项目同步失败。请修复您的项目并重试
问题描述:
Android Studio(1.2 RC0)告诉我运行android:Gradle项目同步失败的错误。请修复您的项目,然后重试。
如何找出问题所在?不幸的是,这个SO线程的解决方案确实
Android Studio (1.2 RC0) keeps telling me
Error running android: Gradle project sync failed. Please fix your project and try again.
How can I find out what the problem is? Unfortunately the solutions from this SO thread did not help.
答
- 转到文件 - >使缓存无效/重新启动
- 关闭Android Studio
- 重命名/删除用户主目录中的.gradle文件夹
- 重新启动Android Studio数据)
- Gradle构建成功
- 重建项目。完成。
- Goto File -> Invalidate caches / Restart
- Shutdown Android Studio
- Rename/remove .gradle folder in the user home directory
- Restart Android Studio (It will download gradle metadata and data)
- Gradle build succeed
- Rebuild project. Done.