Reputation: 1368
So I upgraded to the latest nightly and updated my project to remove all calls to GL10 but I am getting this error even though I have removed the reference to it.
Exception in thread "main" java.lang.NoSuchFieldError: useGL20
at com.me.mygdxgame.Main.main(Main.java:10)
This is what the code in the file looks like
package com.me.mygdxgame;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
public class Main {
public static void main(String[] args) {
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title = "my-gdx-game";
// cfg.useGL20 = false;
cfg.width = 480;
cfg.height = 320;
new LwjglApplication(new MyGdxGame(), cfg);
}
}
Does anyone have an idea of why I still keep getting this error?
Upvotes: 1
Views: 3659
Reputation: 1844
The latest libgdx build has gotten rid of the opengl 1.0 backend so the field cfg.useGL20 is no longer needed. If interested read up here
According to that page
LwjglApplicationConfiguration and AndroidApplicationConfiguration do not have the useGL20 flags anymore.
So eliminate that line and things should be good if you updated each project to the newest nightely. If you are still having problems update projects again to the newest nightly as this is very new to libgdx so there are probably a lot of bugs
Upvotes: 5