gpt4 book ai didi

android - 运行cocos2dxsample项目时出现异常(Raywenderlich tutorial Cocos2D-X for iOS and Android)

转载 作者:行者123 更新时间:2023-11-30 04:00:18 24 4
gpt4 key购买 nike

我正在关注适用于 iOS 和 Android 的 Cocos2D-X:来自 Raywenderlich site 的入门教程.

我已经按照站点中的说明从 create-android-project.sh 命令下载了 android 项目。当我尝试在 eclipse 中运行该项目时,我得到了以下日志:

09-26 13:04:05.081: W/dalvikvm(517): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/a/samplecocos2dxandroid21;
09-26 13:04:05.081: W/dalvikvm(517): Class init failed in newInstance call (Lcom/a/samplecocos2dxandroid21;)
09-26 13:04:05.081: D/AndroidRuntime(517): Shutting down VM
09-26 13:04:05.081: W/dalvikvm(517): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
09-26 13:04:05.091: E/AndroidRuntime(517): FATAL EXCEPTION: main
09-26 13:04:05.091: E/AndroidRuntime(517): java.lang.ExceptionInInitializerError
09-26 13:04:05.091: E/AndroidRuntime(517): at java.lang.Class.newInstanceImpl(Native Method)
09-26 13:04:05.091: E/AndroidRuntime(517): at java.lang.Class.newInstance(Class.java:1319)
09-26 13:04:05.091: E/AndroidRuntime(517): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
09-26 13:04:05.091: E/AndroidRuntime(517): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
09-26 13:04:05.091: E/AndroidRuntime(517): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
09-26 13:04:05.091: E/AndroidRuntime(517): at android.app.ActivityThread.access$600(ActivityThread.java:123)
09-26 13:04:05.091: E/AndroidRuntime(517): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
09-26 13:04:05.091: E/AndroidRuntime(517): at android.os.Handler.dispatchMessage(Handler.java:99)
09-26 13:04:05.091: E/AndroidRuntime(517): at android.os.Looper.loop(Looper.java:137)
09-26 13:04:05.091: E/AndroidRuntime(517): at android.app.ActivityThread.main(ActivityThread.java:4424)
09-26 13:04:05.091: E/AndroidRuntime(517): at java.lang.reflect.Method.invokeNative(Native Method)
09-26 13:04:05.091: E/AndroidRuntime(517): at java.lang.reflect.Method.invoke(Method.java:511)
09-26 13:04:05.091: E/AndroidRuntime(517): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
09-26 13:04:05.091: E/AndroidRuntime(517): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
09-26 13:04:05.091: E/AndroidRuntime(517): at dalvik.system.NativeStart.main(Native Method)
09-26 13:04:05.091: E/AndroidRuntime(517): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load game: findLibrary returned null
09-26 13:04:05.091: E/AndroidRuntime(517): at java.lang.Runtime.loadLibrary(Runtime.java:365)
09-26 13:04:05.091: E/AndroidRuntime(517): at java.lang.System.loadLibrary(System.java:535)
09-26 13:04:05.091: E/AndroidRuntime(517): at com.a.samplecocos2dxandroid21.<clinit>(samplecocos2dxandroid21.java:106)
09-26 13:04:05.091: E/AndroidRuntime(517): ... 15 more

android ndk、android sdk 路径设置和更改 create-android-project.sh 已经完成。有人可以告诉我我错在哪里以及解决方案是什么......,.

最佳答案

你没有运行 build_native.sh 所以你的游戏没有构建到共享库,这就是它提示找不到库的原因

关于android - 运行cocos2dxsample项目时出现异常(Raywenderlich tutorial Cocos2D-X for iOS and Android),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12598164/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com