简体   繁体   中英

LIBGDX - Having a hard time loading libgdx/tests

I have been trying to load the test repository libgdx/tests in eclipse for a couple of hours with no success at all.

I am using JRE 1.8 but compiler compliance level is 1.7. I have followed the tutorial here How to running tests to set up ANT (1.9.7) and GWT(2.6.1 [as recommended in the tutorial]).

I have cleaned all the projects and refreshed them. And i still get this huge bunch of errors because jars are not found (please, don´t tell me they have to be added by hand :? ):

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

NOTE : I am aware of this question: libGDX - gdx-backend-jglfw is missing and some others but it is rather old, so libraries have changed and there is no solution posted.

Eclipse complains about your JRE (bottom of your stack):

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

you need to set the property in Eclipse for preconfigured in the project JRE1.7

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

The other build path problems should be resolved by running ant -f fetch.xml - make sure it succeeded.

Alternatively, you can run more specific ant task eg ant -f fetch.xml fetch-lwjgl to resolve dependencies, which should fix the

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

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

For missing GWT SDK problems:

  • make sure you did:

    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.

  • check it's actually there: eg right click on gdx-backends-gwt project Build Path - Configure Build Path - Libraries tab It should not have errors and correct path provided, like:

在此处输入图片说明

  • do above for all three errored projects gdx-backends-gwt , gdx-box2d-gwt , gdx-controllers-gwt

Btw, 12/12/2016 devs changed it to gwt-2.8.0, see commit a748656a , so maybe didn't update the instruction yet

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

I also did ./gradlew build - but it's not what causing your issues I think

Don't forget to clean-rebuild your 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

Even after that done I still have a problem :)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM