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
#########################################################################################
我是通过这个链接,解决了上述问题,参见http://hi.baidu.com/moon_2009/item/04660a51dc90f4464fff204c
相关内容转载自:http://ask.csdn.net/questions/56767#answer_10388