非页内广告显示黑色(->)AFMA_ReceiveMessage未定义(:1) [英] interstitial ad show black (->) AFMA_ReceiveMessage is not defined (:1)

查看:137
本文介绍了非页内广告显示黑色(->)AFMA_ReceiveMessage未定义(:1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了 Android的官方指南添加插页广告

如果我使用测试模式:

 AdRequest adRequest = new AdRequest.Builder()
                  .addTestDevice("my code here")
                  .build();
 mInterstitialAd.loadAd(adRequest);

工作正常,我可以看到插页式演示。

Works ok and I can see the demo interstitial add.

如果我使用发布模式:

AdRequest adRequest = new AdRequest.Builder().build();
mInterstitialAd.loadAd(adRequest);

我只看到黑色的非页内广告,并以红色登录:

I only see black interstitial add and in log in red:


JS:未捕获的ReferenceError:未定义AFMA_ReceiveMessage(:1)

JS: Uncaught ReferenceError: AFMA_ReceiveMessage is not defined (:1)

+信息:


  • 我使用最近更新的Google Play服务库。

  • 我尝试使用2个设备和2个wifi网络。

  • 在同一设备上,我可以看到其他应用的非页内广告

  • 该广告是在adMob中创建的在过去24小时内。

  • 我尝试线程但应用程序崩溃

  • 我的adMob帐户还可以,我还有其他广告在起作用。

  • I use last updated google play services lib.
  • I try with 2 devices and 2 wifi networks.
  • In the same device I can see other apps interstitial ads
  • The ad was created in adMob in last 24 hours.
  • I try to load add fron thread but app crash
  • My adMob account is ok, I have other ads working.

清单:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

(...)

  <activity android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />

创建活动:

 mInterstitialAd = new InterstitialAd(this);
    mInterstitialAd.setAdUnitId("here my add id");
    mInterstitialAd.setAdListener(new AdListener() {
        @Override
        public void onAdClosed() {

            requestNewInterstitial();

        }
    });

    requestNewInterstitial();

应用内自然休息:

 if (mInterstitialAd.isLoaded()) {
           mInterstitialAd.show();
    }


推荐答案

问题已解决从AdMob中创建广告开始等待22小时。

The problem has been solved just waiting 22 hours since the creation of ad in AdMob.

这篇关于非页内广告显示黑色(->)AFMA_ReceiveMessage未定义(:1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆