SDKBOX AdMob + Google Play Service

SDKBOX AdMob + Google Play Service
0

Hi, I’ve been trying to set up AdMob videos but I only have them working on iOS, still haven’t been able to make it work on Android.

It first crashed becase a Java class was failing, which apparently was due to an older version of GPS, this is the error:

11-25 20:18:00.367 23834-23834/com.robot.squad.puzzle.game D/AdMob: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/rewarded/RewardedAd;

I updated it to the latest version and now it compiles, but it crashes when calling:

sdkbox::PluginAdMob::init();
sdkbox::PluginAdMob::cache("shop_coins");

NOTE: this works on iOS, so the video name is correct.

Does anyone know what Google Play Service I need for AbMob plugin 2.5.0.5???

dependencies { compile 'com.google.android.gms:play-services-ads:17.2.0' }

how do you integrate AdMob plugin ?

When I add that to my build file I get this:

Error: Program type already present: com.google.ads.AdRequest

I am importing all libs using sdkbox CLI, and then the gps project from my libs folders. This is how is set up:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation project(':libcocos2dx')
    implementation project(':gps')

    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
    implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.0.2'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.billingclient:billing:2.0.1'
    implementation 'com.google.android.gms:play-services-ads:17.2.0'
}

Other plugins I have imported are: IAP, AdColony, Firebase and OneSignal, SdkboxPlay, SdkboxAds, Charboost and UnityAds.

After deleting manually the last 4, I now have IAP, AdColony, AdMob, Firebase and OneSignal and I get this error:

Error: Program type already present: com.google.android.gms.ads.internal.overlay.zza

Any thoughts? all other plugins are working in both platforms, and as I said before, AdMob also works on iOS… Thanks for the help!

UPDATE: found some posts about people having libs versions mismatch when using either Firebase or OneSignal, could that be the reason? how can I check to be sure? and how can be fixed if that is the problem?

This crash happens when I remove the following line:

    implementation project(':gps')

This is the crash:

you don’t need it. plz remove it and rebuild.

whats your engine version?