Updated Android studio and libgdx now getting odd error message..

So I update my android studio, as well as libgdx and everything else…Now when I try to run any DesktopLauncher I get this error message…I know my graphics card supports opengl, everything was working fine before…Not sure what to do now.


"C:\Program Files\Android\Android Studio\jre\bin\java" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files\Android\Android Studio\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Android\Android Studio\jre\jre\lib\charsets.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\cldrdata.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\dnsns.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\jaccess.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\localedata.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\nashorn.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunec.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunmscapi.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\zipfs.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\jce.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\jsse.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\management-agent.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\resources.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\rt.jar;C:\Users\hp\AndroidStudioProjects\TDG\desktop\build\classes\main;C:\Users\hp\AndroidStudioProjects\TDG\core\build\classes\main;C:\Users\hp\.gradle\caches\modules-2\files-2.1\com.badlogicgames.gdx\gdx\1.9.4\4b4b7962d1bc75af0438f5c81ec1010557bc9ee5\gdx-1.9.4.jar;C:\Users\hp\AndroidStudioProjects\TDG\core\build\libs\core-1.0.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\com.badlogicgames.gdx\gdx-backend-lwjgl\1.9.4\4c6c108a9dcbc07096de8594b93f9cab33856fe2\gdx-backend-lwjgl-1.9.4.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\com.badlogicgames.gdx\gdx-platform\1.9.4\8e93afecc287ab152179983fc1b5f65db4c2fa4c\gdx-platform-1.9.4-natives-desktop.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl\2.9.2\a9d80fe5935c7a9149f6584d9777cfd471f65489\lwjgl-2.9.2.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl_util\2.9.2\4b9e37300a87799856e0bd15ed81663cdb6b0947\lwjgl_util-2.9.2.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\com.badlogicgames.jlayer\jlayer\1.0.1-gdx\7cca83cec5c1b2f011362f4d85aabd71a73b049d\jlayer-1.0.1-gdx.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\org.jcraft\jorbis\0.0.17\8872d22b293e8f5d7d56ff92be966e6dc28ebdc6\jorbis-0.0.17.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.2\510c7d317f5e9e700b9cfaac5fd38bdebf0702e0\lwjgl-platform-2.9.2-natives-windows.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.2\d276cdf61fe2b516c7b7f4aa1b8dea91dbdc8d56\lwjgl-platform-2.9.2-natives-linux.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.2\d55b46b40b40249d627a83a7f7f22649709d70c3\lwjgl-platform-2.9.2-natives-osx.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput\2.0.5\39c7796b469a600f72380316f6b1f11db6c2c7c4\jinput-2.0.5.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\net.java.jutils\jutils\1.0.0\e12fe1fda814bd348c1579329c86943d2cd3c6a6\jutils-1.0.0.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\7ff832a6eb9ab6a767f1ade2b548092d0fa64795\jinput-platform-2.0.5-natives-linux.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\385ee093e01f587f30ee1c8a2ee7d408fd732e16\jinput-platform-2.0.5-natives-windows.jar;C:\Users\hp\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\53f9c919f34d2ca9de8c51fc4e1e8282029a9232\jinput-platform-2.0.5-natives-osx.jar;C:\Users\hp\AndroidStudioProjects\TDG\desktop\build\libs\desktop-1.0.jar;C:\Program Files\Android\Android Studio\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain com.psillicoder.tdg.desktop.DesktopLauncher
Exception in thread "LWJGL Application" java.lang.NullPointerException
	at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:322)
	at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setupDisplay(LwjglGraphics.java:216)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:142)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:124)

Sometimes dubious code runs okay until an update makes a background change that nonetheless conforms to the api and spec. Have you tracked down the source of your NPE?

Not yet. I’m not really even sure where to look. I tried a game that i’ve been working on for a while which was fully working and I generated a new project and tried that. Right off the gate without doing anything other than setting up the DesktopLauncher i’m getting the same exception. Kind of wishing I wouldn’t have updated anything now. I’m on vacation this week and was looking forward to coding tonight so i’m hoping I can figure it out lol. I’m at that critical stage where things are starting to make sense a little more and I can do more advanced things.

I tried google searching the error but there weren’t many answers there either. A few similar exceptions were saying the graphics card didn’t support openGL. They were a bit different though and the one game was working fine before the update.

On Windows, you might get a low GL version if, during context creation, you use an unaccelerated pixel format. This means you get the default implementation of OpenGL which is version 1.1.

The solution to this is to be more careful in your pixel format selection. More information can be found at Platform_specifics:_Windows and other parts of the Wiki.

This is what’s happening. By forcing software based openGL, it tells me that i’m running 1.1 which is incorrect. I don’t understand what the solution part of that is telling me to do.

Looks like a bug in libgdx and potentially a driver issue


throw new GdxRuntimeException("OpenGL is not supported by the video driver: " + glVersion.getDebugVersionString(), ex3);

your problem : opengl drivers cannot be loaded (as to why thats a different quesion for which I can’t help you with)
libgdx bug : trying to add the glVersion to a debug string after an exception has been thrown saying that opengl is not available on the system

I was just using it though. I opened android studio to start coding again, which I was a couple hours before with no problems, decided to update. Restarted Android Studio, tried to run the game and got this error. Also, tried to create a new project and got the same exact error. I’m not sure what would have changed in my drivers just by updating android studio.

I appreciate the information though. This is really getting frustrating. I’ve been researching for a while now.

It happens to me sometimes with other native android projects too. Just refresh the gradle model and it should work fine. Did you try that? Run gradlew clean build and then in the IDE, refresh from gradle tool pane, finally make before running. I’m sure that would fix it.

I haven’t tried that. I’ll try it now. I’m definitely a newbie when it comes to gradle and all the little tools/programs


FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\hp\AndroidStudioProjects\TechnoBrick\build.gradle' line: 47

* What went wrong:
A problem occurred evaluating root project 'TechnoBrick'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 4 mins 10.457 secs

This is what I get when I try to gradlew clean build

I’ve gotten major-minor version error messages before when trying to do something requiring Java 8 with Java 7. Often we have multiple versions on our computers: jre, jdk’s jre, 32-bit, 64-bit. What is used by the IDE isn’t the same, necessarily as the browser, etc. You probably just have to do some updating.