Cocos Creator native app crash on Android

Cocos Creator native app crash on Android
0.0 0

#1

Hi

I built my cocos creator source code for Android Studio, then debug my game on device. APK installed but right after my game launched, it crashed. I checked Android monitor log, it showed following message:

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList couldn’t find “libcocos2djs.so”

I’m wondering is it because I integrated facebook through sdkbox ?


#2

In fact, the android project is using native(C++) code. So the correct steps is:

  1. Build the project in Cocos Creator.
  2. Click the [Compile] button in the Build Panel.
  3. Debug the apk with Android Studio.

Because the second step will compile the native(C++) code for the android project.
Hope it’s helpful!


#3

Oh I didn’t know that, thank you. Let me try it now


#4

I did as your instructions, after build, compile I have 2 apk files which has 1 unaligned file. I tried installing those files to my phone but not success. I got “Fail to open this file” message


#5

i had the same problem. i removed the build tools 26 version and everything works fine