首页 > 解决方案 > 将 libgdx 项目导入 Eclipse 时出现 Gradle 错误

问题描述

每当尝试将我的 LIBGDX 项目导入我刚刚创建的 eclipse 时,我都会从 eclipse 中收到此错误:

错误真的很长,所以我做了一个 pastebin 错误的第一个位:

Synchronize Gradle projects with workspace failed due to an error in the referenced Gradle build.
Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.6-bin.zip'.

 A problem occurred configuring root project 'Endro'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar
org.gradle.tooling.BuildException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.6-bin.zip'.

我是这个编程领域的新手,我不知道如何修复这些东西。任何帮助表示赞赏!

标签: androideclipsegradlelibgdx

解决方案


经过更多搜索后,我在堆栈跟踪中发现了这个错误:

找不到 aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1)。

并找到了一个帖子,其中的答案解决了这里的问题:

Android CI 构建:找不到 aapt2-proto.jar


推荐阅读