cocos2d-x-2.2.6 Android 整合

cocos2d-x-2.2.6 Android integration

我正在使用 cocos2d-x-2.2.6,当我在设备上使用 runnin 时,我的应用程序崩溃了。 logcat 将我指向 Cocos2dxRenderer.java 文件,它在

中崩溃
@Override
public void onSurfaceCreated(final GL10 pGL10, final EGLConfig pEGLConfig) {
     Cocos2dxRenderer.nativeInit(this.mScreenWidth, this.mScreenHeight);
     this.mLastTickInNanoSeconds = System.nanoTime();
}

调用 Cocos2dxRenderer.nativeInit(this.mScreenWidth, this.mScreenHeight);

错误是:

JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception 'java.lang.NoSuchMethodError' thrown in void org.cocos2dx.lib.Cocos2dxRenderer.nativeInit(int, int):-2 in call to FindClass

这可能是什么原因? 谢谢。

我做到了! 是类型转换问题。