android 工程在Eclipse调试报错

我用cocos2dx引擎开发的一款小游戏,IOS版运行正常,Android版在eclipse上调试报错
错误为:
08-11 19:03:06.623: D/Cocos2dxActivity(28203): model=KFFOWI
08-11 19:03:06.623: D/Cocos2dxActivity(28203): product=full_ford_cn
08-11 19:03:06.623: D/Cocos2dxActivity(28203): isEmulator=false
08-11 19:03:06.632: E/art(28203): No implementation found for void org.cocos2dx.lib.Cocos2dxHelper.nativeSetApkPath(java.lang.String) (tried Java_org_cocos2dx_lib_Cocos2dxHelper_nativeSetApkPath and Java_org_cocos2dx_lib_Cocos2dxHelper_nativeSetApkPath__Ljava_lang_String_2)
08-11 19:03:06.633: D/AndroidRuntime(28203): Shutting down VM
08-11 19:03:06.634: E/AndroidRuntime(28203): FATAL EXCEPTION: main
08-11 19:03:06.634: E/AndroidRuntime(28203): Process: com.ztwireless.Sparta, PID: 28203
08-11 19:03:06.634: E/AndroidRuntime(28203): java.lang.UnsatisfiedLinkError: No implementation found for void org.cocos2dx.lib.Cocos2dxHelper.nativeSetApkPath(java.lang.String) (tried Java_org_cocos2dx_lib_Cocos2dxHelper_nativeSetApkPath and Java_org_cocos2dx_lib_Cocos2dxHelper_nativeSetApkPath__Ljava_lang_String_2)
08-11 19:03:06.634: E/AndroidRuntime(28203): at org.cocos2dx.lib.Cocos2dxHelper.nativeSetApkPath(Native Method)
08-11 19:03:06.634: E/AndroidRuntime(28203): at org.cocos2dx.lib.Cocos2dxHelper.init(Cocos2dxHelper.java:71)
08-11 19:03:06.634: E/AndroidRuntime(28203): at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:69)
08-11 19:03:06.634: E/AndroidRuntime(28203): at android.app.Activity.performCreate(Activity.java:6010)
08-11 19:03:06.634: E/AndroidRuntime(28203): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
08-11 19:03:06.634: E/AndroidRuntime(28203): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2320)
08-11 19:03:06.634: E/AndroidRuntime(28203): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2435)
08-11 19:03:06.634: E/AndroidRuntime(28203): at android.app.ActivityThread.access$800(ActivityThread.java:160)
08-11 19:03:06.634: E/AndroidRuntime(28203): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
08-11 19:03:06.634: E/AndroidRuntime(28203): at android.os.Handler.dispatchMessage(Handler.java:102)
08-11 19:03:06.634: E/AndroidRuntime(28203): at android.os.Looper.loop(Looper.java:135)
08-11 19:03:06.634: E/AndroidRuntime(28203): at android.app.ActivityThread.main(ActivityThread.java:5484)
08-11 19:03:06.634: E/AndroidRuntime(28203): at java.lang.reflect.Method.invoke(Native Method)
08-11 19:03:06.634: E/AndroidRuntime(28203): at java.lang.reflect.Method.invoke(Method.java:372)
08-11 19:03:06.634: E/AndroidRuntime(28203): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:984)
08-11 19:03:06.634: E/AndroidRuntime(28203): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
有知道是什么原因的吗?

4个回答

文件路径没放对吧,jni中调.so文件的接口文件路径要放对

不要用eclipse,用Android Studio

你装个Android Studio吧!现在Android开发最常用的

我也遇见这个问题了,我找了好几天最后在找到原因是因为在引入第三方SDK时,在复制第三方AndroidManifest.xml信息参数的时候把自己AndroidManifest.xml中的

< !-- Tell Cocos2dxActivity the name of our .so -->
android:name="android.app.lib_name"
android:value="cocos2dlua" /> 给覆盖了,找了好长时间才发现,希望能帮助你。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!