ninjaxelite
ninjaxelite

Reputation: 1178

How to add the libandenginephysicsbox2dextension.so file in Android Studio | Andengine

I wanted to develop an app with Android Studio using the Andengine. After I have imported the andengine.jar and the libandenginephysicsbox2dextension.jar everything seemed to work correctly. At the point where the PhysicsWorld is created:

private void createPhysics() {
        physicsWorld = new FixedStepPhysicsWorld(60, new Vector2(0, -17), false);
        registerUpdateHandler(physicsWorld);
    }

this exception appears: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.sample.packet.sample-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libandenginephysicsbox2dextension.so"

I think I must download the *.so file but I don't know where to place it in my project. Could anyone help?

Upvotes: 2

Views: 1452

Answers (2)

Sandeep R
Sandeep R

Reputation: 2292

you can follow my answer here https://stackoverflow.com/a/34068202/2026280

or

Its very simple. Follow this simple steps

1) Create a new folder called "lib" inside the libs folder of the main app.

2) Copy all the folders ie.armabi , armabi-v7a etc from andEnginePhysicsBox2DExtension/libs folder, and paste in in the previously created "lib" folder in main app.

3) Now compress the "lib" folder as "lib.zip" and rename it to "lib.jar". this changes the zip extension to jar.

4) Finally add a line -- compile files('lib.jar') under dependencies{} in Build.gradle file of your main app.

5) Clean and build the project.

Upvotes: 1

Renier
Renier

Reputation: 1830

Mine is located in a directory under you application.

file : https://www.dropbox.com/s/71lxz2ec9qrn236/libandenginephysicsbox2dextension.so?dl=0

enter image description here

Upvotes: 0

Related Questions