我在 这个问题上遇到了同样的问题,但解决方案对我不起作用。我已将我的 JAR 包含在构建路径中。我在做什么错?
我正在使用相同的示例。
这是崩溃日志:
07-08 04:04:33.440: E/AndroidRuntime(751): FATAL EXCEPTION: main
07-08 04:04:33.440: E/AndroidRuntime(751): java.lang.NoClassDefFoundError: org.cocos2d.opengl.CCGLSurfaceView
07-08 04:04:33.440: E/AndroidRuntime(751): at a.b.Cocos2DGameActivity.onCreate(Cocos2DGameActivity.java:22)
07-08 04:04:33.440: E/AndroidRuntime(751): at android.app.Activity.performCreate(Activity.java:4465)
07-08 04:04:33.440: E/AndroidRuntime(751): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-08 04:04:33.440: E/AndroidRuntime(751): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
07-08 04:04:33.440: E/AndroidRuntime(751): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-08 04:04:33.440: E/AndroidRuntime(751): at android.app.ActivityThread.access$600(ActivityThread.java:123)
07-08 04:04:33.440: E/AndroidRuntime(751): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-08 04:04:33.440: E/AndroidRuntime(751): at android.os.Handler.dispatchMessage(Handler.java:99)
07-08 04:04:33.440: E/AndroidRuntime(751): at android.os.Looper.loop(Looper.java:137)
07-08 04:04:33.440: E/AndroidRuntime(751): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-08 04:04:33.440: E/AndroidRuntime(751): at java.lang.reflect.Method.invokeNative(Native Method)
07-08 04:04:33.440: E/AndroidRuntime(751): at java.lang.reflect.Method.invoke(Method.java:511)
07-08 04:04:33.440: E/AndroidRuntime(751): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-08 04:04:33.440: E/AndroidRuntime(751): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-08 04:04:33.440: E/AndroidRuntime(751): at dalvik.system.NativeStart.main(Native Method)