将Android Studio更新为1.5后出现Gradle错误

时间:2015-12-06 17:27:45

标签: android android-studio gradle libgdx

今天我已将Android Studio更新为v1.5。我有libgdx项目,在此更新之前运行良好。现在我收到此错误消息。

    Error:Unable to load class 'org.gradle.mvn3.org.sonatype.aether.resolution.ArtifactResolutionException'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

error message

我尝试删除.gradle文件夹,重启Android Studio,清理项目,但我收到同样的错误。

感谢您的帮助

2 个答案:

答案 0 :(得分:6)

我只需要在主gradle文件中更新gradle构建工具

    classpath 'com.android.tools.build:gradle:1.3.0'
    classpath 'org.robovm:robovm-gradle-plugin:1.0.0-beta-04'

为:

    classpath 'com.android.tools.build:gradle:1.2.3'
    classpath 'org.robovm:robovm-gradle-plugin:1.9.0'

答案 1 :(得分:0)

可能与Gradle和maven版本不兼容 删除项目目录/ gradle / wrapper 把正确的版本放入其中 再跑一次

https://github.com/dcendents/android-maven-gradle-plugin