LIBGDX - 加载困难 libgdx/tests

LIBGDX - Having a hard time loading libgdx/tests

我一直在尝试在 eclipse 中加载测试存储库 libgdx/tests 几个小时,但完全没有成功。

我使用的是 JRE 1.8,但编译器兼容级别是 1.7。我已经按照这里的教程 How to running tests 设置了 ANT (1.9.7) 和 GWT(2.6.1 [按照教程中的建议])。

我已经清理了所有项目并刷新了它们。而且我仍然遇到一大堆错误,因为找不到罐子(请不要告诉我必须手动添加它们:?):

Description Resource    Path    Location    Type
Project 'gdx-backend-jglfw' is missing required library: '/gdx/libs/gdx-natives.jar'    gdx-backend-jglfw       Build path  Build Path Problem
Project 'gdx-backend-jglfw' is missing required library: 'libs/gdx-backend-jglfw-natives.jar'   gdx-backend-jglfw       Build path  Build Path Problem
Project 'gdx-backend-jglfw' is missing required library: 'libs/jglfw.jar'   gdx-backend-jglfw       Build path  Build Path Problem
Project 'gdx-backend-lwjgl' is missing required library: '/gdx/libs/gdx-natives.jar'    gdx-backend-lwjgl       Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: '/gdx/libs/gdx-natives.jar'   gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-glfw-natives-linux.jar'   gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-glfw-natives-macos.jar'   gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-glfw-natives-windows.jar' gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-glfw.jar' gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-jemalloc-natives-linux.jar'   gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-jemalloc-natives-macos.jar'   gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-jemalloc-natives-windows.jar' gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-jemalloc.jar' gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-natives-linux.jar'    gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-natives-macos.jar'    gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-natives-windows.jar'  gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-openal-natives-linux.jar' gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-openal-natives-macos.jar' gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-openal-natives-windows.jar'   gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-openal.jar'   gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-opengl.jar'   gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-stb-natives-linux.jar'    gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-stb-natives-macos.jar'    gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-stb-natives-windows.jar'  gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl-stb.jar'  gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-lwjgl3' is missing required library: 'libs/lwjgl.jar'  gdx-backend-lwjgl3      Build path  Build Path Problem
Project 'gdx-backend-robovm' is missing required library: 'libs/robovm-cacerts-full.jar'    gdx-backend-robovm      Build path  Build Path Problem
Project 'gdx-backend-robovm' is missing required library: 'libs/robovm-cocoatouch.jar'  gdx-backend-robovm      Build path  Build Path Problem
Project 'gdx-backend-robovm' is missing required library: 'libs/robovm-objc.jar'    gdx-backend-robovm      Build path  Build Path Problem
Project 'gdx-backend-robovm' is missing required library: 'libs/robovm-rt.jar'  gdx-backend-robovm      Build path  Build Path Problem
Project 'gdx-bullet' is missing required library: 'libs/gdx-bullet-natives.jar' gdx-bullet      Build path  Build Path Problem
Project 'gdx-controllers-desktop' is missing required library: 'libs/gdx-controllers-desktop-natives.jar'   gdx-controllers-desktop     Build path  Build Path Problem
Project 'gdx-freetype' is missing required library: 'libs/gdx-freetype-natives.jar' gdx-freetype        Build path  Build Path Problem
Project 'gdx-tests-android' is missing required source folder: 'gen'    gdx-tests-android       Build path  Build Path Problem
Project 'gdx-tests-lwjgl' is missing required library: '/gdx-box2d/libs/gdx-box2d-natives.jar'  gdx-tests-lwjgl     Build path  Build Path Problem
Project 'gdx-tests-lwjgl' is missing required library: '/gdx-controllers-desktop/libs/gdx-controllers-desktop-natives.jar'  gdx-tests-lwjgl     Build path  Build Path Problem
Project 'gdx-tests-lwjgl' is missing required library: '/gdx-freetype/libs/gdx-freetype-natives.jar'    gdx-tests-lwjgl     Build path  Build Path Problem
Project 'gdx-tests-lwjgl3' is missing required library: '/gdx-box2d/libs/gdx-box2d-natives.jar' gdx-tests-lwjgl3        Build path  Build Path Problem
Project 'gdx-tests-lwjgl3' is missing required library: '/gdx-controllers-desktop/libs/gdx-controllers-desktop-natives.jar' gdx-tests-lwjgl3        Build path  Build Path Problem
Project 'gdx-tests-lwjgl3' is missing required library: '/gdx-freetype/libs/gdx-freetype-natives.jar'   gdx-tests-lwjgl3        Build path  Build Path Problem
Project 'gdx' is missing required library: 'libs/hamcrest-core-1.3.jar' gdx     Build path  Build Path Problem
Project 'gdx' is missing required library: 'libs/junit-4.11.jar'    gdx     Build path  Build Path Problem
Unbound classpath container: 'GWT SDK [missing]' in project 'gdx-backends-gwt'  gdx-backends-gwt        Build path  Build Path Problem
Unbound classpath container: 'GWT SDK [missing]' in project 'gdx-box2d-gwt' gdx-box2d-gwt       Build path  Build Path Problem
Unbound classpath container: 'GWT SDK [missing]' in project 'gdx-controllers-gwt'   gdx-controllers-gwt     Build path  Build Path Problem
Build path specifies execution environment JavaSE-1.7. There are no JREs installed in the workspace that are strictly compatible with this environment.     gdx-controllers-gwt     Build path  JRE System Library Problem

注意:我知道这个问题:libGDX - gdx-backend-jglfw is missing and some others但是它很旧,所以库已经改变并且没有发布解决方案。

Eclipse 抱怨您的 JRE(堆栈底部):

Build path specifies execution environment JavaSE-1.7. There are no JREs installed in the workspace that are strictly compatible with this environment. gdx-controllers-gwt Build path JRE System Library Problem

您需要 to set the property in Eclipse 在项目 JRE1.7

中进行预配置

===============

其他构建路径问题应由 运行ning ant -f fetch.xml 解决 - 确保成功。

或者,您可以 运行 更具体的蚂蚁任务,例如ant -f fetch.xml fetch-lwjgl 解决依赖关系,应该修复

Project 'gdx-backend-lwjgl3' is missing required library

===============

对于缺少 GWT SDK 的问题:

  • 确保你做到了:

    GWT Plugin for Eclipse - follow the instructions on the page and install only required and GWT stuff Also make sure that default GWT SDK is 2.6.1. You will probably have to download it here and install it by going to Window/Eclipse -> Preferences -> Google -> Web Toolkit -> Add and then make sure it is checked.

  • 检查它是否确实存在:例如右键单击 gdx-backends-gwt 项目 Build Path - Configure Build Path - Libraries 选项卡 它不应该提供错误和正确的路径,例如:

  • 对所有三个错误的项目执行上述操作 gdx-backends-gwtgdx-box2d-gwtgdx-controllers-gwt

顺便说一句,12/12/2016 开发者将其更改为 gwt-2.8.0,参见 commit a748656a,所以可能还没有更新说明

===============

我也做过 ./gradlew build - 但我认为这不是导致您出现问题的原因

不要忘记清理重建您的 eclipse:

To resolve the issues do the following:

Go to Project -> Clean Make sure all projects are selected, then click OK

Select all projects in the package explorer, then hit F5 to refresh them (vodoo...)

There will be a few issues remaining concerning GWT. In the Problems view, right click on each entry saying "The web.xml file does not exist", select Quick Fix and press OK

即使在那之后我仍然有问题:)

The project was not built since its build path is incomplete. Cannot find the class file for org.robovm.apple.uikit.UIApplicationDelegateAdapter.