terry494 / cocos2d-android-1

Automatically exported from code.google.com/p/cocos2d-android-1
0 stars 0 forks source link

libgdx Box2D World Issue #63

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In Android application, instantiate a new World object 
(com.badlogic.gdx.physics.box2d.World)
2. Receive error when attempting to run on phone (HTC Desire Z) = 
unsatisfiedLinkError: newWorld

What is the expected output? What do you see instead?
- I expected it to create a new World object.

What version of the product are you using? On what operating system?
- I just pulled the latest source code. System is Windows XP, 32-bit.

Please provide any additional information below.
- The error occurs in the World class in the constructor where it calls the 
native function newWorld(...). Apparently JVM can't find the required libs?

Original issue reported on code.google.com by leifstro...@gmail.com on 28 Apr 2011 at 3:53

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Is the libgdx.so file present in your project?
My guess is you have something like this in your code:

System.loadLibrary("gdx");

But you havn't added the libgdx.so file to your project, giving the link error.

Original comment by dcasloc...@gmail.com on 2 May 2011 at 12:31

GoogleCodeExporter commented 8 years ago
Thanks for the help!

I have figured out the issue now.

Original comment by leifstro...@gmail.com on 2 May 2011 at 8:36

GoogleCodeExporter commented 8 years ago
Hey, I'm getting the same error on Mac even though I've added libgdx.so. I'm 
copying it to my lib folder and adding it to the project. Is there anything I'm 
missing?

Original comment by curtisda...@gmail.com on 4 May 2011 at 4:57

GoogleCodeExporter commented 8 years ago
Here is what I'm getting. Any thoughts? leifstro..., would you mind posting 
your resolution?

05-10 19:28:12.180: DEBUG/dalvikvm(284): Trying to load lib 
/data/data/com.angryshakingfist.android.losergame/lib/libgdx.so 0x44ededf0
05-10 19:28:12.400: DEBUG/dalvikvm(284): Added shared lib 
/data/data/com.angryshakingfist.android.losergame/lib/libgdx.so 0x44ededf0
05-10 19:28:12.400: DEBUG/dalvikvm(284): No JNI_OnLoad found in 
/data/data/com.angryshakingfist.android.losergame/lib/libgdx.so 0x44ededf0, 
skipping init

Original comment by curtisda...@gmail.com on 10 May 2011 at 11:34

GoogleCodeExporter commented 8 years ago
Hi there,

It looks like your libgdx.so file is placed in  "<your project>/lib/"

Try placing libgdx.so in "<your project>/libs/armeabi" instead.

David

Original comment by dcasloc...@gmail.com on 11 May 2011 at 1:24

GoogleCodeExporter commented 8 years ago
Hey David,

Thanks a million for the response! I'm still getting the error mentioned above, 
but I fixed a line of my code and it appears I'm able to move forward. It will 
probably come back to bite me later, but for now I'll keep coding along.

My company gave me a gift card of which most of the money is still on it. If 
you send an address to my e-mail, I'll get it out to you. Thanks again dude!

Original comment by curtisda...@gmail.com on 18 May 2011 at 4:01

GoogleCodeExporter commented 8 years ago
Hi again,

That is very kind of you but I'm just glad if I can help. If everything is 
working for you at the moment, I don't think the debug output you posted is 
anything to be concerned about.

David

Original comment by dcasloc...@gmail.com on 23 May 2011 at 11:53