I'm trying to include andengine physicsbox2d-extension in my project. It was very easy using eclipse (Just import the project and include in path)
But now I'm trying to do it in android studio
I tried those 2 method and get exception in both of them
Method 1: Include andenginephysicsbox2dextension.jar
this cause the following run time exception:
E/AndroidRuntime﹕ FATAL EXCEPTION: UpdateThread
java.lang.UnsatisfiedLinkError: Couldn't load andenginephysicsbox2dextension from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.myproject.myproject-2.apk,libraryPath=/data/app-lib/com.myproject.myproject-2]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:355)
at java.lang.System.loadLibrary(System.java:525)
at org.andengine.extension.physics.box2d.PhysicsWorld.<clinit>(PhysicsWorld.java:35)
Method 2 : Include andEnginePhysicsBox2DExtension project
this cause a compilation error:
Error:Execution failed for task ':andEnginePhysicsBox2DExtension:compileReleaseNdk'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Program Files\Android\android-ndk-r10\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\MYUSER\AndroidstudioProjects\myproject\andEnginePhysicsBox2DExtension\build\intermediates\ndk\release\Android.mk APP_PLATFORM=android-14 NDK_OUT=C:\Users\MYUSER\AndroidstudioProjects\myproject\andEnginePhysicsBox2DExtension\build\intermediates\ndk\release\obj NDK_LIBS_OUT=C:\Users\MYUSER\AndroidstudioProjects\myproject\andEnginePhysicsBox2DExtension\build\intermediates\ndk\release\lib APP_ABI=all
Error Code:
1
Does anyone manage to import this extension to android studio?
What am I doing wrong?