如上所述,在我的应用中集成AdMob时收到上述错误。我当然检查了AFMA_ReceiveMessage is not defined(似乎没有具体的解决方案),我检查了interstitial ad show black (->) AFMA_ReceiveMessage is not defined (:1)(但我的广告已经大约20小时了),我检查了AdMob: AFMA_ReceiveMessage is not defined (:1)(不是得到答案)我检查AFMA_ReceiveMessage is not defined using APPODEAL(不是我得到的确切错误)。我的代码如下:
在Manifest中我重新获得权限:
<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" />
在我的相应活动布局中:
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/banner_ad_overview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"/>
活动的java代码中的代码:
AdView mAdView = (AdView) findViewById(R.id.adView);
AdRequest.Builder adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
// .addTestDevice("my device id");
AdRequest request = adRequest.build();
mAdView.loadAd(request);
我按照建议的here尝试了DEVICE_ID_EMULATOR,并尝试使用我的设备ID。我一次又一次地尝试了最后一次。 20个小时,我疯了。有谁知道我哪里出错了?