eclipse - 将自动生成的LibGDX gradle项目导入Eclipse时出现问题

标签 eclipse gradle libgdx

我想开始学习LibGDX框架,因此一开始使用Setup应用程序生成一个新项目听起来很方便。当我尝试将其作为gradle项目导入eclipse IDE时,出现了我的问题。我收到的错误消息如下:

Description Resource Path Location Type Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-5.4.1-bin.zip'. Build file 'E:\Workspace\Eclipse\LibGDX\test\desktop\build.gradle' line: 27 A problem occurred evaluating project ':desktop'. Could not get unknown property 'classesDir' for main classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput. build.gradle /test/desktop line 27 Gradle Error Marker



由于我是Gradle的新手,所以我现在真的不知道该怎么做。

我已经尝试删除.grade / wrapper / dist目录,并让LibGDX设置应用程序再次下载所有内容。另外在安装应用程序中使用的版本是4.6,所以我尝试在导入中使用它,但没有成功。

使用设置应用程序中使用的gradle版本时,我遇到了另一个错误消息:

Description Resource Path Location Type Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.6-bin.zip'. Could not create service of type FileMetadataAccessor using NativeServices.createFileMetadataAccessor(). Could not determine java version from '11.0.3'. test line 0 Gradle Error Marker



如果您需要更多信息,请随时询问,我真的不知道您可能需要什么。

先感谢您!

最佳答案

gradle 5中不推荐使用“classesDir”,而将其替换为“classesDirs”。

如果您遇到其他任何更新问题,您可能会发现this link很有帮助。

关于eclipse - 将自动生成的LibGDX gradle项目导入Eclipse时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56589284/

相关文章:

eclipse - SVN - 忽略存储库中已有的文件

gradle - 在.gradle文件中设置gradle系统属性

java - libGDX:如何处理 Tiled 对象层中 Sprite 的碰撞?

java - HTTP 状态 500 - 实例化 servlet 类 example.webApp 时出错

java - android.support.v7.widget.GridLayout 实例化失败

android - Volley 不适用于 Gradle 2.0 和 Instant run

java - LibGDX 中的 JFileChooser

java - 为什么我的指针 y 坐标颠倒了?

java - 获取更多 SSL 调试信息

log4j - 在Eclipse的Java Gradle Web应用程序中将log4j.properties放在哪里