Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/188.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android 9是否存在阻止横幅广告的问题_Android_Android Studio_Admob - Fatal编程技术网

android 9是否存在阻止横幅广告的问题

android 9是否存在阻止横幅广告的问题,android,android-studio,admob,Android,Android Studio,Admob,我的横幅广告和间隙广告在8和9以下的设备上运行良好,但在8或9上不起作用,但在我的模拟器中,在android 9上运行良好 我的应用发布在google play上,我的广告在安卓8下的设备上运行良好,但安卓8或9未显示,在安卓10的模拟器上运行良好,但在真实设备上无法运行 在mainfest <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:

我的横幅广告和间隙广告在8和9以下的设备上运行良好,但在8或9上不起作用,但在我的模拟器中,在android 9上运行良好


我的应用发布在google play上,我的广告在安卓8下的设备上运行良好,但安卓8或9未显示,在安卓10的模拟器上运行良好,但在真实设备上无法运行
在mainfest

<meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="MyAppID" />
活跃

AdView adview2; 
adview2 = (AdView) findViewById(R.id.adView2);
 AdRequest adRequest = new AdRequest.Builder().build(); adview2.loadAd(adRequest); 
在xml中

 <com.google.android.gms.ads.AdView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/adView2"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        ads:adSize="BANNER"
        ads:adUnitId="AdID"
        >
    </com.google.android.gms.ads.AdView>

您在调试模式下仅为adRequest()添加了一个测试设备

所以它只适用于那个设备

首先,您不需要使用具有真实AdMob单元id的live帐户进行测试


您可以使用测试ad单元id,不需要检查它是否处于调试模式。

您使用的是哪个SDK?请发布更多详细信息,最好是代码来解释您面临的问题。我的应用程序发布在google play上,我的广告在android 8下的设备上效果很好,但android 8或9没有显示,在android 10的模拟器上效果很好,但在真实设备上效果不好。您可以点击下面的链接,我认为这将对您有所帮助。
 <com.google.android.gms.ads.AdView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/adView2"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        ads:adSize="BANNER"
        ads:adUnitId="AdID"
        >
    </com.google.android.gms.ads.AdView>