首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MoPub - Ad加载失败

MoPub - Ad加载失败
EN

Stack Overflow用户
提问于 2014-12-22 18:30:55
回答 1查看 5.5K关注 0票数 2

我对下面的错误感到困惑,不知道错误在哪里,这里的任何帮助都是非常感谢的。

代码:

代码语言:javascript
复制
mopubView = (MoPubView) mainLayout.findViewById(R.id.mopubAdView);
mopubView.setAdUnitId("a19bd46992bc44c8959c13cc25f60e9c");
mopubView.setLayoutParams(params);
mopubView.loadAd();

视图XML代码:

代码语言:javascript
复制
<com.mopub.mobileads.MoPubView
        android:id="@+id/mopubAdview"
        android:layout_width="fill_parent"
        android:layout_height="50dp" />

清单文件的一瞥:

代码语言:javascript
复制
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<other settings />

<activity
    android:name="com.mopub.mobileads.MoPubActivity"
    android:configChanges="keyboardHidden|orientation" />
<activity
    android:name="com.mopub.mobileads.MraidActivity"
    android:configChanges="keyboardHidden|orientation" />
<activity
    android:name="com.mopub.common.MoPubBrowser"
    android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
    android:name="com.mopub.mobileads.MraidBrowser"
    android:configChanges="keyboardHidden|orientation" />
<activity
    android:name="com.mopub.mobileads.MraidVideoPlayerActivity"
    android:configChanges="keyboardHidden|orientation" />
<activity
    android:name="com.google.ads.AdActivity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
    android:name="com.millennialmedia.android.MMActivity"
    android:configChanges="keyboardHidden|orientation|keyboard"
    android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity
    android:name="com.millennialmedia.android.VideoPlayer"
    android:configChanges="keyboardHidden|orientation|keyboard" />

Logcat输出

代码语言:javascript
复制
In AndroidManifest, the android:configChanges param is missing values for the following MoPub activities:
    The android:configChanges param for activity com.mopub.mobileads.MoPubActivity must include screenSize.
    The android:configChanges param for activity com.mopub.mobileads.MraidActivity must include screenSize.
    The android:configChanges param for activity com.mopub.mobileads.MraidVideoPlayerActivity must include screenSize.
Please update your manifest to include them.
In AndroidManifest, the android:configChanges param is missing values for the following MoPub activities:
    The android:configChanges param for activity com.mopub.mobileads.MoPubActivity must include screenSize.
    The android:configChanges param for activity com.mopub.mobileads.MraidActivity must include screenSize.
    The android:configChanges param for activity com.mopub.mobileads.MraidVideoPlayerActivity must include screenSize.
Please update your manifest to include them.
Loading url: http://ads.mopub.com/m/ad?v=6&id=a19bd46992bc44c8959c13cc25f60e9c&nv=3.3.0&dn=samsung%2CSAMSUNG-SGH-I337%2Cjflteuc&udid=ifa%3A937232dd-fa11-424f-94a0-f84897b305f4&ll=39.26126126126126%2C-84.33420242467194&lla=2000&llsdk=1&z=-0500&o=p&sc_a=3.0&mr=1&mcc=310&mnc=410&iso=us&cn=AT%26T&ct=2&av=1.02&android_perms_ext_storage=1&ts=1
Ad Unit (a19bd46992bc44c8959c13cc25f60e9c) is still warming up. Please try again in a few minutes.
Ad failed to load.
EN

回答 1

Stack Overflow用户

发布于 2015-01-21 16:04:04

下面链接到关于MoPub主题的Manifest.xml文档(向下滚动到更新Android )。它在“重要注释”中将screenSize称为configChanges。

重要注意事项

1.如果您正在针对低于13的API进行编译,则应将“screenSize”从清单条目中排除在外。

https://dev.twitter.com/mopub/android/getting-started

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27608425

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档