2 jixianwanmei999 JiXianWanMei999 于 2014.03.02 18:38 提问

android cocos2dx环境搭建好以后,运行hellocpp出现了如下错误

03-02 16:51:40.923: W/dalvikvm(6716): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/cocos2dx/hellocpp/HelloCpp;
03-02 16:51:40.923: W/dalvikvm(6716): Class init failed in newInstance call (Lorg/cocos2dx/hellocpp/HelloCpp;)
03-02 16:51:40.923: D/AndroidRuntime(6716): Shutting down VM
03-02 16:51:40.923: W/dalvikvm(6716): threadid=1: thread exiting with uncaught exception (group=0x4139eac8)
03-02 16:51:40.923: E/AndroidRuntime(6716): FATAL EXCEPTION: main
03-02 16:51:40.923: E/AndroidRuntime(6716): java.lang.ExceptionInInitializerError
03-02 16:51:40.923: E/AndroidRuntime(6716): at java.lang.Class.newInstanceImpl(Native Method)
03-02 16:51:40.923: E/AndroidRuntime(6716): at java.lang.Class.newInstance(Class.java:1319)
03-02 16:51:40.923: E/AndroidRuntime(6716): at android.app.Instrumentation.newActivity(Instrumentation.java:1071)
03-02 16:51:40.923: E/AndroidRuntime(6716): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
03-02 16:51:40.923: E/AndroidRuntime(6716): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2295)
03-02 16:51:40.923: E/AndroidRuntime(6716): at android.app.ActivityThread.access$700(ActivityThread.java:150)
03-02 16:51:40.923: E/AndroidRuntime(6716): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
03-02 16:51:40.923: E/AndroidRuntime(6716): at android.os.Handler.dispatchMessage(Handler.java:99)
03-02 16:51:40.923: E/AndroidRuntime(6716): at android.os.Looper.loop(Looper.java:137)
03-02 16:51:40.923: E/AndroidRuntime(6716): at android.app.ActivityThread.main(ActivityThread.java:5279)
03-02 16:51:40.923: E/AndroidRuntime(6716): at java.lang.reflect.Method.invokeNative(Native Method)
03-02 16:51:40.923: E/AndroidRuntime(6716): at java.lang.reflect.Method.invoke(Method.java:511)
03-02 16:51:40.923: E/AndroidRuntime(6716): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
03-02 16:51:40.923: E/AndroidRuntime(6716): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
03-02 16:51:40.923: E/AndroidRuntime(6716): at dalvik.system.NativeStart.main(Native Method)
03-02 16:51:40.923: E/AndroidRuntime(6716): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load hellocpp from loader dalvik.system.PathClassLoader[dexPath=/data/app/org.cocos2dx.hellocpp-1.apk,libraryPath=/data/app-lib/org.cocos2dx.hellocpp-1]: findLibrary returned null
03-02 16:51:40.923: E/AndroidRuntime(6716): at java.lang.Runtime.loadLibrary(Runtime.java:365)
03-02 16:51:40.923: E/AndroidRuntime(6716): at java.lang.System.loadLibrary(System.java:535)
03-02 16:51:40.923: E/AndroidRuntime(6716): at org.cocos2dx.hellocpp.HelloCpp.(HelloCpp.java:37)
03-02 16:51:40.923: E/AndroidRuntime(6716): ... 15 more

希望各位高人帮忙看看

2个回答

JiXianWanMei999
JiXianWanMei999   2014.03.04 18:36
已采纳

http://hi.baidu.com/moon_2009/item/04660a51dc90f4464fff204c
根据这个网址里面说的方法,配置一下ndk以及各种参数吧,关键有三步

zhao_zepeng
zhao_zepeng   2014.03.03 11:35

哥们,我也有这问题,解决了么

zhao_zepeng
zhao_zepeng 解决了,assets资源文件没有拷贝到相关文件夹下,谢谢了啊,哥们
3 年多之前 回复
JiXianWanMei999
JiXianWanMei999 解决了,http://hi.baidu.com/moon_2009/item/04660a51dc90f4464fff204c我是根据这里面的方法解决的
3 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片