I have a LibGDX project in android studio that uses gradle. It worked well until this morning but due to LibGDX changes now the box2d extension doesn't work properly.
I think i've already done the right imports like so:
- build.gradle (root of the project)
project(":core") { apply plugin: "java" dependencies { compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion" compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" compile fileTree (dir:'../libs', include:['*.jar']) } } project(":desktop") { apply plugin: "java" dependencies { compile project(":core") compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop" compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop" compile fileTree (dir:'../libs', include:['*.jar']) } }
(rest of build.gradle omitted for simplicity)
However when I try to use PolygonShape I get the following error:
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.UnsatisfiedLinkError: com.badlogic.gdx.physics.box2d.PolygonShape.newPolygonShape()J at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:120) Caused by: java.lang.UnsatisfiedLinkError: com.badlogic.gdx.physics.box2d.PolygonShape.newPolygonShape()J at com.badlogic.gdx.physics.box2d.PolygonShape.newPolygonShape(Native Method) at com.badlogic.gdx.physics.box2d.PolygonShape.(PolygonShape.java:29) at com.marclabsoftware.app.utilities.BodyEditorLoader.(BodyEditorLoader.java:34) at com.marclabsoftware.app.utilities.Utilities.init(Utilities.java:81) at com.marclabsoftware.app.App.create(App.java:50) at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136) at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)
Is there a way to fix this error? Thanks for any reply