Mopub广告不显示 [英] Mopub ads not showing
问题描述
我已经被困在某个问题上一段时间,我无法弄清楚它是什么。事情是我最近更新的 Mopub的Android SDK 的两者间+横幅广告(的AdMob 和千禧传媒的)都工作正常之前。现在,这些广告都没有工作,在发布版本,但他们做的工作在调试版本。所以我觉得这是一个问题, ProGuard的
,但我不能跟踪它是什么。该 ProGuard的
是根据 Mopub 的指导原则设置。
I've been stuck on an issue for a while and I can't figure out what it is. The thing is I recently updated the Mopub Android SDK and both interstitial + banner ads (AdMob and Millennial Media) were working fine before that. Now these ads aren't working in the release build but they do work in debug build. So I think this is an issue with proguard
but I can't trace what it is. The proguard
is setup according to Mopub guidelines.
我已经加入以下到 ProGuard的
我的项目:
I have 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.
请建议可能是什么错误。任何反馈将AP preciated。
Please suggest what the error might be. Any feedback would be appreciated.
此外,我不知道这是相关或没有,但我工作的一个的 Cocos2dx的Android 的项目。
Also I don't know if this is relevant or not but I'm working on a Cocos2dx Android project.
感谢。
推荐答案
这是ProGuard的实在。如果你不希望它摆脱Mopub,AdMob的和MMEDIA code的全部,只要把下面几行到项目的ProGuard的-project.txt文件:
It is ProGuard indeed. If you don't want it to "get rid" of Mopub, AdMob and MMedia code entirely, just put the following lines into proguard-project.txt file of your project:
-keep class com.google.ads.** {*;}
-keep class com.mopub.mobileads.** {*;}
-keep class com.millennialmedia.android.** {*;}
-keep class com.millennialmedia.google.** {*;}
这篇关于Mopub广告不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!