Android game crashes at the start in Android 4.4, api level 19 devices


My game crashes at the start :frowning: in almost all devices with Android 4.4.x (api level 19) devices. Please help! @pabitrapadhy, @nite
It crashes with both js and c++ versions.

Cocos2dx version: 3.14.1
compileSdkVersion 22
buildToolsVersion "22.0.1"
minSdkVersion 10
targetSdkVersion: have tried with 19, 22, 23

used sdkbox plugins : appodeal

[Edit: Compiled through cocos console command line]

Below is the log:
java.lang.NoClassDefFoundError: com.sdkbox.plugin.SdkboxLog
at com.sdkbox.plugin.SDKBox.init(
at org.cocos2dx.lib.Cocos2dxActivity.onCreate(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(
at dalvik.system.NativeStart.main(Native Method)


Did you build with android studio?


Nope, as I said in the post, I am using command line.


Can you download the appodeal again and replace the sdkbox.jar from the package?


But it’s working in Android 5 and greater versions. Only it didn’t work in 4.4 and lesser versions.
Ok I will try replacing the jar again.


Tried replacing the .jar file, it’s still the same. Doesn’t work in Android 4.4. :frowning:


There is really serious issue with Appodeal through sdkbox in cocos2dx 3.14.1.
I tried with admob through sdkbox, it works in Android 4.4 and above versions. It was working with targetsdkversion 19 and 23.

But when I try appodeal through sdkbox with targetsdkversion less than 23 it works in Android 5 and above but not in Android 4.4.
And another problem is the command line build doesn’t even work when I set targetsdkversion to 23 :frowning: .
My previous build has targetsdkversion 23, so I need to set same or higher. Now I’m really stuck here for a week and getting frustrated. @pabitrapadhy will you please help me out here ?

This infos I got in cocos console: [targetsdkversion 23, cocos2dx 3.14.1, appodeal]
Unknown source file : method ID not in [0, 0xffff]: 65536
Unknown source file : at$6.updateIndex(
Unknown source file : at$IdMerger.mergeSorted(
Unknown source file : at
Unknown source file : at
Unknown source file : at
Unknown source file : at
Unknown source file : at
Unknown source file : at
Unknown source file : at
Unknown source file : at


You have more than 65k methods in your code. You’re probably using google play services as one package - use only modules that you need. From the other hand you can also use multidexing. But you have to use gradle build system anyway.


What I did was just imported appodeal (sdkbox import appodeal) and followed the manual process. sdkbox itself puts “google-play-services.jar” there and it’s lite version as per them.
I’m still kind of noob here, is gradle build applicable if I’m using cocos console command line ?


You have to use (not I’m not using SDKBOX (rather using native libraries and calling them by JNI), so I don’t know how exactly it’s working.


Yes I’m already doing that with --android-studio param in the command line.


@ryanjjj may I request you to have a look here please?


Is it possible for us to access your project? I think it’s likely a configuration issue.