0
我正在關注如何在eclipse上運行cocos2d-x項目的本教程(http://www.cocos2d-x.org/wiki/How_to_Build_an_Android_Project_with_Eclipse)。我正在使用Android NDK r10c和cocos2d-x-3.0。它在終端上運行良好,但每次嘗試從eclipse運行到真實設備時,都會崩潰。我已經嘗試了許多故障排除選項,但是,它仍然沒有工作cocos2d-x項目在真實設備上崩潰
這是logcat的:
10-30 12:23:12.658: E/AndroidRuntime(32241): FATAL EXCEPTION: main
10-30 12:23:12.658: E/AndroidRuntime(32241): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mole.game/org.cocos2dx.cpp.AppActivity}: java.lang.ClassNotFoundException: Didn't find class "org.cocos2dx.cpp.AppActivity" on path: /data/app/com.mole.game-1.apk
10-30 12:23:12.658: E/AndroidRuntime(32241): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2229)
10-30 12:23:12.658: E/AndroidRuntime(32241): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
10-30 12:23:12.658: E/AndroidRuntime(32241): at android.app.ActivityThread.access$700(ActivityThread.java:165)
10-30 12:23:12.658: E/AndroidRuntime(32241): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1326)
10-30 12:23:12.658: E/AndroidRuntime(32241): at android.os.Handler.dispatchMessage(Handler.java:99)
10-30 12:23:12.658: E/AndroidRuntime(32241): at android.os.Looper.loop(Looper.java:137)
10-30 12:23:12.658: E/AndroidRuntime(32241): at android.app.ActivityThread.main(ActivityThread.java:5455)
10-30 12:23:12.658: E/AndroidRuntime(32241): at java.lang.reflect.Method.invokeNative(Native Method)
10-30 12:23:12.658: E/AndroidRuntime(32241): at java.lang.reflect.Method.invoke(Method.java:525)
10-30 12:23:12.658: E/AndroidRuntime(32241): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
10-30 12:23:12.658: E/AndroidRuntime(32241): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
10-30 12:23:12.658: E/AndroidRuntime(32241): at dalvik.system.NativeStart.main(Native Method)
10-30 12:23:12.658: E/AndroidRuntime(32241): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.cocos2dx.cpp.AppActivity" on path: /data/app/com.mole.game-1.apk
10-30 12:23:12.658: E/AndroidRuntime(32241): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
10-30 12:23:12.658: E/AndroidRuntime(32241): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
10-30 12:23:12.658: E/AndroidRuntime(32241): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
10-30 12:23:12.658: E/AndroidRuntime(32241): at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
10-30 12:23:12.658: E/AndroidRuntime(32241): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2220)
10-30 12:23:12.658: E/AndroidRuntime(32241): ... 11 more
在控制檯消息
[2014-10-30 12:22:16 - Mole] Android Launch!
[2014-10-30 12:22:16 - Mole] adb is running normally.
[2014-10-30 12:22:16 - Mole] Performing org.cocos2dx.cpp.AppActivity activity launch
[2014-10-30 12:22:16 - Mole] Automatic Target Mode: using device '550fa800'
[2014-10-30 12:22:18 - Mole] Application already deployed. No need to reinstall.
[2014-10-30 12:22:18 - libcocos2dx] Could not find libcocos2dx.apk!
[2014-10-30 12:22:18 - Mole] Starting activity org.cocos2dx.cpp.AppActivity on device 550fa800
[2014-10-30 12:22:19 - Mole] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.mole.game/org.cocos2dx.cpp.AppActivity }
這些是你的線索:「路徑中沒有找到class org.cocos2dx.cpp.AppActivity」:/data/app/com.mole.game-1.apk「和」找不到libcocos2dx.apk! 「 搜索這些特定問題的可能原因。 – LearnCocos2D 2014-10-30 13:08:16
你如何解決這類問題? – 2014-10-30 14:07:33
實際上不知道,將不得不採取這谷歌自己。 ;) – LearnCocos2D 2014-10-30 14:49:43