The game runs fine if I compile and run using the following:
cocos compile -p android --android-studio
cocos run -p android --android-studio
If I run the game from the Android Studio (Run Button), or cocos run -p android --android-studio
The code compiles without any errors, but when I run the game, it crashes instantly.
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.scp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.csp-1/lib/arm64, /data/app/com.scp-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libMyGame.so"
I’ve changed the Application.mk a few times (located in: proj.androidn-studio/app/jni/Application.mk:
APP_ABI := armeabi and APP_ABI := armeabi-v7a
But it always crashes for the same reason.
I’m not sure if it have anything to do with this error, but I’m implementing fyber so I’ve made some changes to build.gradle (Module:cp)
repositories {
maven {
name "Fyber's maven repo"
url "https://fyber.bintray.com/maven"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libcocos2dx')
compile 'com.fyber.mediation:admob:9.6.1-r1@aar'
compile 'com.fyber.mediation:adcolony:3.0.4-r1@aar'
}
What am I doing wrong?