cocos 2d的X86库libgdx.so抛出Jni Pending异常

时间:2013-12-16 10:07:34

标签: android x86 java-native-interface libgdx

我正在尝试将使用cocos2d开发的游戏转换为在Intel X86设备上运行。我从GitHUb获得了libgdx.so文件。我试图在游戏中使用它,但它产生以下错误。我对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)

1 个答案:

答案 0 :(得分:0)

在google中使用异常引发调用的主题 JNI方法提供了大量结果。你试过吗?我的猜测是你指定了一个错误的方法名称(例如,其中包含空格/标点符号)或错误的签名字符串。

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

C and Java through Jni

Android Pending Exception