###前提・実現したいこと
cocos2d-xをandroid環境で実行させたいのですが、
AndroidStudioでの実行とコマンドプロンプトでの実行、両方でエラーが出て困っています。
###発生している問題・エラーメッセージ
◆AndroidStudio
作成したcocos2d-xのプロジェクト「proj.android-studio」を開いて、Runボタンを押します。
エミュレータが開き、cocos2d-xのアイコンもありますが、
「問題が発生したため、libcocos2dxを終了します。」と表示されます。
logcatでは以下のエラーが出ています。
FATAL EXCEPTION: main Process: org.cocos2dx.MySampleGame1, PID: 3364 java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.cocos2dx.MySampleGame1-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libcocos2dcpp.so" at java.lang.Runtime.loadLibrary(Runtime.java:366) at java.lang.System.loadLibrary(System.java:988) at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:248) at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:263) at android.app.Activity.performCreate(Activity.java:5990) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
◆コマンドプロンプト
cocos2d-xのプロジェクト配下で「cocos run -p android」を実行します。
色々と処理が走った後、最後に以下が表示されます。
Starting: Intent { cmp=org.cocos2dx.MySampleGame1/org.cocos2dx.cpp.AppActivity } Error type 3 Error: Activity class {org.cocos2dx.MySampleGame1/org.cocos2dx.cpp.AppActivity} does not exist.
###補足情報(言語/FW/ツール等のバージョンなど)
・cocos2d-x:3.10
・android-ndk:r10c
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。