Have been searching for hours on google, but still without success. I always get the Error Message and the adBanner doesnt load:
There was a problem getting an ad response. ErrorCode: 1
Failed to load ad: 1
build.gradle
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.google.android.gms:play-services-ads:9.4.0'
Android Manifest
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent"
/>
layout
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adSize="BANNER"
android:layout_marginTop="20dip"
ads:adUnitId="pub-*****************"
android:layout_below="@+id/middle"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
activity (imports)
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
activity
AdView adView = (AdView)findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
permissions are also added
ty for your help in advance
ca-app-pub-...
. – FairmanMobileAds.initialize(getApplicationContext(), getString(R.string.admobs_app_id));
– Hummock