Android Admob集成不需要';不显示广告
我已成功地将Admob集成到我的应用程序中。我有我的Admob密钥。但它不起作用。它不会在应用程序中显示广告 这是我的XML。这就是我到目前为止所做的Android Admob集成不需要';不显示广告,android,admob,Android,Admob,我已成功地将Admob集成到我的应用程序中。我有我的Admob密钥。但它不起作用。它不会在应用程序中显示广告 这是我的XML。这就是我到目前为止所做的 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/res-au
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.radioaudio.motivationalaudios.MyYouTubePlayer">
<com.google.android.youtube.player.YouTubePlayerView
android:id="@+id/youtube_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/videoTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="Arise, Awake and stop not till the truth is known - Radio Story | IIT Kanpur Radio"
android:textColor="#000"
android:textSize="20dp" />
<com.google.android.gms.ads.NativeExpressAdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adUnitId="ca-app-pub-5059726881726792/7013814664"
ads:adSize="280x132">
</com.google.android.gms.ads.NativeExpressAdView>
</LinearLayout>
本地广告需要时间来展示。所以请等待2-3个小时。它们将自动弹出。您可能刚在一分钟前创建了帐户。您在logcat中收到错误代码了吗
NativeExpressAdView adView = (NativeExpressAdView) findViewById(R.id.adView);
AdRequest request = new AdRequest.Builder()
.addTestDevice("A5E3E2068BD88202CBC281AD76984BEE")
.build();
adView.loadAd(request);