Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libgdx can't start desktop project on ubuntu

so, I just created libgdx project for desktop and imported it (gradle) to eclipse. When I launch it this error pops up:

Exception in thread "LWJGL Application" java.lang.ExceptionInInitializerError
at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(LwjglGraphics.java:446)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:118)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at org.lwjgl.opengl.LinuxDisplay.getAvailableDisplayModes(LinuxDisplay.java:954)
at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:738)
at org.lwjgl.opengl.Display.<clinit>(Display.java:138)
... 2 more
AL lib: (EE) alc_cleanup: 1 device not closed

I can't figure out what's happening. Project's created for android and launched in android studio working properly.

like image 579
Null-Pointer-Exception Avatar asked Jul 07 '15 19:07

Null-Pointer-Exception


1 Answers

You need to install the xorg-xrandr package, see

http://badlogicgames.com/forum/viewtopic.php?f=11&t=18801

like image 71
Barodapride Avatar answered Oct 05 '22 06:10

Barodapride