运行android:Gradle项目同步失败。请修复您的项目并重试

运行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.


  1. 转到文件 - >使缓存无效/重新启动

  2. 关闭Android Studio

  3. 重命名/删除用户主目录中的.gradle文件夹

  4. 重新启动Android Studio数据)

  5. Gradle构建成功

  6. 重建项目。完成。

  1. Goto File -> Invalidate caches / Restart
  2. Shutdown Android Studio
  3. Rename/remove .gradle folder in the user home directory
  4. Restart Android Studio (It will download gradle metadata and data)
  5. Gradle build succeed
  6. Rebuild project. Done.