I am running into issues that are unrelated to the original issue of this post. Not sure if I need to create a new post but anyway if you have an idea:
I tried to copy the JAR you gave me, but it seems I needed the latest versions of SDKBOX plugins. So I updated them via the SDKbox-GUI and all went well. IOS build fine with the new updated version, however I cannot get the android to build (with the official JARs, not the one you gave me). Regardless what I do I get either compile error or some errors that say Program type already present.
It seems the newer version is using a new place to store the jar: proj.android\app\libs. While the previous version used cocos2d\cocos\platform\android\java\libs. So I endup with the old JARs in one place and the new JARs in another place. I tried to removed them from one place, I get compile error as it cannot solve import com.sdkbox.plugin.SDKBox. I tried having them at both places and I get link error:
Error: Program type already present: com.android.billingclient.api.BillingBroadcastManager$BillingBroadcastReceiver
I am kind of stuck at the moment. Regardless of my original crash issues, I just cannot make the newer version of SDKBox plugins to compile on android.
******EDIT *****
From another post, I saw that I now had a depedency on billing:1.0 added in the gradle script. So I removed the JAR of this lib and resolved this issue. I then removed all plugin JARs from one place and kept them at the new directory except sdkbox.jar since I need it in both place to compile it seems… I end up with one new duplicate dependency:
Error: Program type already present: com.sdkbox.adbooster.AdBooster
EDIT 2*
Seems like I really need to put all in the new directory. I end up with the compile error where my cocos2dxactivity java file cannot resolve import com.sdkbox.plugin.SDKBox
EDIT 3*
So I was able to make it compile and I tested and everything seems to be working. Had to do multiple modifications
sdkbox.jar is within the folder: cocos2d\cocos\platform\android\java\libs
Other plugin jars are within proj.android\app\libs
I replaced the original IAPplugin with yours
changed AppActivity extends from com.sdkbox.plugin.SDKBoxActivity to Cocos2dxActivity
Removed android-support-v4.jar, support-annotations-27.1.1.jar and billing-1.0.jar since they were duplicate.
removed the depedency in the gradle file for com.google.android.gms:play-services-ads:15.0.1
I can’t believe I really needed to do all this. I guess a lot of legacy jars and dependencies. However, the fact that I cannot make it work with the extends sdkboxActivity and only work with the base cocos2dxActivity has me a little worried. However, everything seems to be working fine. Not sure what it does with or without.
I will let you know if I see more crashes.