How to use Tiled with Libgdx

I’ve been slowly trying to figure out how to use libgdx and I ran into an, apparently, outdated tutorial ( https://code.google.com/p/libgdx-users/wiki/Tiles )on how to use tiled to create maps easily and then how to load and render them with libgdx. After a bit of messing around I was unable to figure out how to get the code working due to all of the links to the full code being broken. I then came on here and searched through a few threads to find a more up-to-date tutorial ( https://code.google.com/p/libgdx/wiki/GraphicsTileMaps#Rendering_Tiled_Maps ) but a lot of the classes that that tutorial requires don’t exist in com.badlogic.gdx when the tutorial says that they should.

Does anyone know of a tutorial that is entirely up-to-date and that will be able to show me how to use tiled with libgdx?

Which classes don’t exist?

The second link you posted is the right tutorial, but libGDX 0.9.8 doesn’t contain some of the classes. I don’t know what is going on there, but check this out: http://www.badlogicgames.com/wordpress/?p=2870 On this post you can find github link and download the project, which contains those classes. I had to unzip the original library and add classes from com.badlogic.gdx.maps.tiled.* to get it to work. Kind of messy, but it works.

I tried downloading the files from github but I don’t have enough time to go through every single class and manually fix every single import and package statement. Is there anywhere where I can just download the jar file and import it?

Try the nightlies:
http://libgdx.badlogicgames.com/nightlies/

Most of the missing classes were in the nightly gdx.jar but, according to the error I’m getting now, there is still a missing class.

Here is the new error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/badlogic/gdx/graphics/GLU
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:64)
	at core.Core_Display.<init>(Core_Display.java:17)
	at core.Core_Main.main(Core_Main.java:13)
Caused by: java.lang.ClassNotFoundException: com.badlogic.gdx.graphics.GLU
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 3 more

I’ve checked the jar and com/badlogic/gdx/graphics/GLU definitely doesn’t exist.

Chances are you updated some of your JARs without updating all of them. GLU is no longer included in LibGDX; so that your LWJGL backend is trying to find it suggests that you are using an outdated backend.

Delete ALL the JARs from your project and download them ALL again from the newest nightly. Then add them all to your Build Path in the Eclipse Project Properties. After this, do a Clean and Build to ensure everything is refreshed.

If your projects are split into desktop, android, html, etc. then an easier solution is to use the “Update” function of the LibGDX setup-ui tool.

It’s all working now, thanks!