0

我在使用 cocos2dx 和 android 4.2.1 时遇到问题 我的应用在 4.2 之前的平台上运行良好,但在我的 nexus 上出现以下错误:

02-07 16:55:06.691: W/dalvikvm(10381): Exception thrown (Ljava/lang/ArrayStoreException;) while throwing internal exception (Ljava/lang/ArrayStoreException;)
02-07 16:55:06.691: W/dalvikvm(10381): Exception thrown (Ljava/lang/ArrayStoreException;) while throwing internal exception (Ljava/lang/ArrayStoreException;)
02-07 16:55:06.711: W/dalvikvm(10381): threadid=12: thread exiting with uncaught exception (group=0x40c74930)
02-07 16:55:06.711: W/System.err(10381): java.lang.ArrayStoreException: java.lang.String cannot be stored in an array of type java.lang.String[][]
02-07 16:55:06.711: W/System.err(10381):    at org.cocos2dx.lib.Cocos2dxRenderer.nativeTouchesEnd(Native Method)
02-07 16:55:06.711: W/System.err(10381):    at org.cocos2dx.lib.Cocos2dxRenderer.handleActionUp(Cocos2dxRenderer.java:129)
02-07 16:55:06.711: W/System.err(10381):    at org.cocos2dx.lib.Cocos2dxGLSurfaceView$9.run(Cocos2dxGLSurfaceView.java:255)
02-07 16:55:06.711: W/System.err(10381):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
02-07 16:55:06.711: W/System.err(10381):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
02-07 16:55:06.711: D/FlurryAgent(10381): Error logged: uncaught
02-07 16:55:06.711: D/FlurryAgent(10381): Ending session
02-07 16:55:06.711: E/AndroidRuntime(10381): FATAL EXCEPTION: GLThread 556
02-07 16:55:06.711: E/AndroidRuntime(10381): java.lang.ArrayStoreException: java.lang.String cannot be stored in an array of type java.lang.String[][]
02-07 16:55:06.711: E/AndroidRuntime(10381):    at org.cocos2dx.lib.Cocos2dxRenderer.nativeTouchesEnd(Native Method)
02-07 16:55:06.711: E/AndroidRuntime(10381):    at org.cocos2dx.lib.Cocos2dxRenderer.handleActionUp(Cocos2dxRenderer.java:129)
02-07 16:55:06.711: E/AndroidRuntime(10381):    at org.cocos2dx.lib.Cocos2dxGLSurfaceView$9.run(Cocos2dxGLSurfaceView.java:255)
02-07 16:55:06.711: E/AndroidRuntime(10381):    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
02-07 16:55:06.711: E/AndroidRuntime(10381):    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)

请帮忙,我不明白出了什么问题。

4

1 回答 1

0

我解决了。

编辑 AnalyticXStringUtilAndroid.cpp (diwu/AnalyticX)
第 24 行

jStringCls = pEnv->FindClass("[Ljava/lang/String;");

替换为

jStringCls = pEnv->FindClass("java/lang/String");
于 2013-02-28T13:31:04.310 回答