Ich möchte Google-Anzeigen verwenden und alles sieht gut aus, aber die Anzeige wird nicht angezeigt. habe ich versucht, diesen Code, aber es scheint nicht zu arbeiten, die ich heruntergeladen habe der Dienst Google sdk spielen, und ich heruntergeladen Google Repository und nutzte ich die Kompilierung in der build.gradle hier ist mein Code in manifest Die Google-Anzeigen werden nicht in meinem Handy angezeigt
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
</manifest>
Und in der Layout-XML-Datei:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context="com.joba4joo.adstist.MainActivity">
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="85dp">
</com.google.android.gms.ads.AdView>
</RelativeLayout>
Und im mai nActivity
package com.joba4joo.adstist;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
AdView mAdView = (AdView) this.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);}}
können Sie mir bitte helfen .... danke
nicht und ich verwendet, um die Benutzerberechtigung Internet und Zugangsnetz – joba