fatal errr in android because without the libgdx-box2d.so
Closed this issue · 4 comments
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.github.quillraven.darkmatter-1/base.apk"],nativeLibraryDirectories=[/data/app/com.github.quillraven.darkmatter-1/lib/x86, /data/app/com.github.quillraven.darkmatter-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libgdx-box2d.so"
12-25 06:50:43.176 E/AndroidRuntime( 1966): at java.lang.Runtime.loadLibrary0(Runtime.java:972)
12-25 06:50:43.176 E/AndroidRuntime( 1966): at java.lang.System.loadLibrary(System.java:1530)
12-25 06:50:43.176 E/AndroidRuntime( 1966): at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:114)
should add the code :
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
can you tell me please how you can reproduce this issue because for me it is working just fine on my Galaxy S8. I am no android expert that's why any help is appreciated.
I use Intellij to install the game on my phone. Maybe I installed box2d libraries globally somehow and that's why I don't have that issue or you are creating the apk differently ?
Also, I see darkmatter in your error messages which is a different repository. Did you maybe post into the wrong one? Or I messed something up 😅
Dark Matter does not have box2d.
@vigourlu: please update the project once more. I think I messed something up the day I was changing some versions for dark matter and quilly adventure.
The android gradle.plugin.kts should now be correct again. Unfortunately, I cannot reproduce the issue because for me it works by also using the dark matter android gradle fiile and I have no idea why.
But obviously it should not work because a lot of dependencies are missing not only box2d.
Please try it with the updated android gradle file and let me know if this fixes your issue.
Thank you!
I will close the issue for now. Please let me know if the changes helped or not.
Thank you!