1

I am trying to convert a game that is developed using cocos2d, to run on Intel X86 device. I got libgdx.so file from GitHUb. I am trying to use it in the game but it is generating following error. I don't know much about JNI.

12-16 15:13:27.756: W/dalvikvm(1260): JNI WARNING: JNI method called with exception raised
12-16 15:13:27.770: W/dalvikvm(1260):              in Lcom/badlogic/gdx/physics/box2d/World;.newWorld (FFZ)J (GetMethodID)

12-16 15:13:27.770: W/dalvikvm(1260): Pending exception is:

12-16 15:13:27.770: I/dalvikvm(1260): Ljava/lang/NoSuchMethodError;: preSolve
12-16 15:13:27.770: I/dalvikvm(1260):   at com.badlogic.gdx.physics.box2d.World.newWorld(Native Method)

12-16 15:13:27.770: I/dalvikvm(1260):   at com.badlogic.gdx.physics.box2d.World.<init>(World.java:71)

12-16 15:13:27.770: I/dalvikvm(1260):   at sevenseas.tiles.Game.<init>(Game.java:42)

12-16 15:13:27.770: I/dalvikvm(1260):   at sevenseas.tiles.TableClass.<init>(TableClass.java:15)

12-16 15:13:27.770: I/dalvikvm(1260):   at sevenseas.tiles.TilesActivity.onStart(TilesActivity.java:87)
CodeSmile
  • 64,284
  • 20
  • 132
  • 217

1 Answers1

0

Seatching JNI method called with exception raised in google gives a lot of results. Did you try them? My guess is that you either specify a wrong method name (e.g. with spaces/punctuation in it) or a wrong signature string.

Trouble calling on a Java method from a native thread using JNI (C++)

C and Java through Jni

Android Pending Exception

Community
  • 1
  • 1
18446744073709551615
  • 16,368
  • 4
  • 94
  • 127
  • thanks for the reply.Actually i am not writing any jni code or methods that directly uses jni code.i am using imported libraries and .so files which uses native code in their inner methods.the problem is due to them and i dont know how to solve a problem for which i dont have any code except the .so file – Prathyusha Reddy Dec 18 '13 at 05:15
  • Then probably the code expects some method in some of your classes, and does not find one. This is either the object that calls the JNI method or some class found by name (because I do not think that it may be an object being an argument, that would be too complex). Just a lucky guess: set the minimal API level in AndroidManifest.xml to the latest and see if the error goes. If that does not help, you have to find out which class and which method. The method name is most likely a string constant and may be seen in the .so binary. – 18446744073709551615 Dec 18 '13 at 07:19
  • thanks for your help.i didnt solve my issue yet but i got an idea what to search – Prathyusha Reddy Dec 18 '13 at 12:38