我遇到了解决依赖关系的问题。你们有类似的问题吗?有任何想法吗? 提前谢谢
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'test'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find org.robovm:robovm-gradle-plugin:1.0.0-SNAPSHOT.
Searched in the following locations:
_https://repo1.maven.org/maven2/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/maven-metadata.xml
_https://repo1.maven.org/maven2/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/robovm-gradle-plugin-1.0.0-SNAPSHOT.pom
_https://repo1.maven.org/maven2/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/robovm-gradle-plugin-1.0.0-SNAPSHOT.jar
_https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/maven-metadata.xml
_https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/robovm-gradle-plugin-1.0.0-SNAPSHOT.pom
_https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.0.0-SNAPSHOT/robovm-gradle-plugin-1.0.0-SNAPSHOT.jar
Required by: :test:unspecified
(我在链接中添加了下划线,以便在此处发布。)
当我取消选中iOS子项目时它会起作用...不知道如何修复它
答案 0 :(得分:1)
使用libGDX版本1.5.4的libGDX项目时遇到了同样的问题。
在build.gradle文件中查找类似的内容:
classpath' org.robovm:robovm-gradle-plugin:1.0.0-SNAPSHOT'并将其更改为:classpath' org.robovm:robovm-gradle-plugin:1.0.0-beta-04'
执行相同操作:roboVMVersion =' 1.0.0-SNAPSHOT'并将其更改为:roboVMVersion =' 1.0.0-beta-04'
这应该起作用,否则尝试将两者都改为:1.0.0-beta-01。
在此之后,它应该要求您同步项目,现在点击同步!
希望这有帮助! 以下是一些有用的链接:
https://github.com/robovm/robovm-gradle-plugin#robovm-gradle-plugin http://libgdx.badlogicgames.com/news.html
答案 1 :(得分:0)
对于正在使用最新版本的Android Studio 4.0.0的用户,如果您的 Generate (生成)在libGDX中失败,则会显示
失败:构建失败,并出现异常。
不用担心,您需要通过将您在libGDX中创建的文件拖到Android Studio中,然后转到 Gradle Script> gradle-wrapper.properties ,将Gradle版本降级到6.0。 改变
distributionUrl = https://services.gradle.org/distributions/gradle-6.3-zip.zip
更改为
distributionUrl = https://services.gradle.org/distributions/gradle-6.0-all.zip
请注意,您还需要安装Java jdk 8!
这对我有用,我不得不花很多时间,包括卸载Android Studio,但它根本不起作用。根据以上经验,我可以非常快速且经济地解决问题!