I have tried to add AndEngine in several ways but it didn't work. The tutorials I followed were for GLES2 and I did exactly what they asked me to do.
- I updated Eclipse
- I made Java Compilance is 1.6
- I have checked the needed things in Order and Export
It didn't work when i added the Library AndEngine to my dummy game.So i put the jar of this library in my Lib folder added it to my libraries and checked it in Order and Export.
This solution worked but i can only use the codes for the AndEngine like Scene/camera. I added the AndEngine library to AndEnginePhysicsBox2DExtension in same way i did for my project (As jar) and i imported AndEnginePhysicsBox2DExtension to my project as jar. I can use the codes related to AndEnginePhysicsBox2DExtension but when i launch the app on any Real/virtual device it crashes.It didn't crash when i removed the codes related to AndEnginePhysicsBox2DExtension.
What I need: I need a solution to be able to add AndEnginePhysicsBox2DExtension as Jar and be able to Run it without the error shown below (i tried running it on Real and virtual devices)
OR
I need to know how can I add AndEngine in this way
Without getting this error
The error I get when I import AndEnginePhysicsBox2DExtension as Jar is
05-14 21:34:27.388: E/AndEngine(14083): MainActivity.onCreateScene failed. @(Thread: 'GLThread 33368')
05-14 21:34:27.388: E/AndEngine(14083): java.lang.ExceptionInInitializerError
05-14 21:34:27.388: E/AndEngine(14083): at com.example.test.MainActivity.onCreateScene(MainActivity.java:71)
05-14 21:34:27.388: E/AndEngine(14083): at org.andengine.ui.activity.BaseGameActivity$3.onCreateResourcesFinished(BaseGameActivity.java:169)
05-14 21:34:27.388: E/AndEngine(14083): at com.example.test.MainActivity.onCreateResources(MainActivity.java:53)
05-14 21:34:27.388: E/AndEngine(14083): at org.andengine.ui.activity.BaseGameActivity.onCreateGame(BaseGameActivity.java:181)
05-14 21:34:27.388: E/AndEngine(14083): at org.andengine.ui.activity.BaseGameActivity.onSurfaceCreated(BaseGameActivity.java:110)
05-14 21:34:27.388: E/AndEngine(14083): at org.andengine.opengl.view.EngineRenderer.onSurfaceCreated(EngineRenderer.java:80)
05-14 21:34:27.388: E/AndEngine(14083): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1494)
05-14 21:34:27.388: E/AndEngine(14083): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
05-14 21:34:27.388: E/AndEngine(14083): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load andenginephysicsbox2dextension: findLibrary returned null
05-14 21:34:27.388: E/AndEngine(14083): at java.lang.Runtime.loadLibrary(Runtime.java:365)
05-14 21:34:27.388: E/AndEngine(14083): at java.lang.System.loadLibrary(System.java:535)
05-14 21:34:27.388: E/AndEngine(14083): at org.andengine.extension.physics.box2d.PhysicsWorld.<clinit>(PhysicsWorld.java:35)
05-14 21:34:27.388: E/AndEngine(14083): ... 8 more
Edit
Jar Libraries are put in the projects as shown