I’ve been stuck in a problem for some time, and I can’t understand what it is. The fact is, I recently updated the Mopub Android SDK, and both interstitial + banner ads (AdMob and Millennial Media) worked fine before that. Now these ads do not work in release builds, but they work in debug builds. Therefore, I think this is a problem with proguard , but I can not track what it is. proguard configured as recommended by Mopub.
I added the following to proguard for my project:
-keep class com.google.ads.** -keep class com.millennialmedia.android.** -keep public class com.mopub.mobileads.* -keepclassmembers class com.millennialmedia.android.* { public *; }
In the release build, when I try to display an ad, I get the following logs:
I/MoPub (29856): Fetching ad network type: admob_native D/MoPub (29856): Loading custom event interstitial adapter. D/MoPub (29856): Attempting to invoke custom event: com.mopub.mobileads.GoogleAdMobInterstitial D/MoPub (29856): Couldn't locate or instantiate custom event: com.mopub.mobileads.GoogleAdMobInterstitial. I/MoPub (29856): Fetching ad network type: admob_native D/MoPub (29856): Loading custom event adapter. D/MoPub (29856): Attempting to invoke custom event: com.mopub.mobileads.GoogleAdMobBanner D/MoPub (29856): Couldn't locate or instantiate custom event: com.mopub.mobileads.GoogleAdMobBanner. V/MoPub (29856): MoPubErrorCode: Unable to find Native Network or Custom Event adapter.
Please indicate what might be a mistake. Any feedback would be appreciated.
Also, I don't know if this is relevant or not, but I'm working on the Cocos2dx Android project.
Thanks.
source share