I've been stuck on an issue related to IT technology for a while and I can't figure out what's causing it. Recently, I updated the Mopub Android SDK and both interstitial and banner ads from AdMob and Millennial Media were working fine before that. However, now these ads aren't working in the release build but they do work in debug builds. Therefore, I suspect that this is an issue with ProGuard, but I can't identify the root cause. The ProGuard setup is based on Mopub guidelines.
For my project, I have added the following code to ProGuard:
在发布版本中,当我尝试显示广告时,会出现以下日志:
请提出错误可能是什么。欢迎任何反馈意见。
另外,我不知道这是否相关,但我正在开发一个Cocos2dx Android项目。
谢谢。
For my project, I have added the following code to ProGuard:
-keep class com.google.ads.**
-keep class com.millennialmedia.android.**
-keep public class com.mopub.mobileads.*
-keepclassmembers class com.millennialmedia.android.* {
public *;
}
在发布版本中,当我尝试显示广告时,会出现以下日志:
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.
请提出错误可能是什么。欢迎任何反馈意见。
另外,我不知道这是否相关,但我正在开发一个Cocos2dx Android项目。
谢谢。
-dontwarn com.millennialmedia.android.NVASpeechKit*
就可以让它工作。 - AlexGuti