gpt4 book ai didi

android - MoPub - 广告加载失败

转载 作者:搜寻专家 更新时间:2023-11-01 07:55:59 27 4
gpt4 key购买 nike

我对下面的错误感到困惑,不确定错误在哪里,感谢您的帮助。

代码:

mopubView = (MoPubView) mainLayout.findViewById(R.id.mopubAdView);
mopubView.setAdUnitId("a19bd46992bc44c8959c13cc25f60e9c");
mopubView.setLayoutParams(params);
mopubView.loadAd();

查看 XML 代码:

<com.mopub.mobileads.MoPubView
android:id="@+id/mopubAdview"
android:layout_width="fill_parent"
android:layout_height="50dp" />

list 文件一瞥:

<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 输出

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.

最佳答案

下面对 Activity 的更新解决了这个问题,MoPub 文档没有说明这一点,但是当你使用应用程序时,你会收到这个错误,我已经创建了一个 MoPub 问题来调查这个问题并更新他们的文档,如果需要。

<activity
android:name="com.mopub.mobileads.MoPubActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.mobileads.MraidActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.common.MoPubBrowser"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.mobileads.MraidBrowser"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.mobileads.MraidVideoPlayerActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<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" />

更新我报告了 MoPub 的问题,mopub wiki 上的文档已更新 - https://github.com/mopub/mopub-android-sdk/issues/134 看起来这个 repo 的所有者不允许公众提出任何问题

关于android - MoPub - 广告加载失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27608425/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com