Hello there,
I am trying for at least 6h how to ad an admob banner.
The banner is just visible in the grafical view of the activity_main.xml. There it shows blank just the text: Ads by Google.
If I start it on a real device, nothing apear not even a box just nothing and you cant click it.
My LogCat output:
01-21 18:59:26.768: I/Ads(26882): Use AdRequest.Builder.addTestDevice("7DC393B415BE44EB0BBB77E514CE33C3") to get test ads on this device.
01-21 18:59:26.778: I/Ads(26882): Starting ad request.
01-21 18:59:26.898: W/(26882): init htc webcore
01-21 19:00:27.168: W/Ads(26882): Timed out waiting for ad response.
01-21 19:00:27.178: I/Ads(26882): Scheduling ad refresh 60000 milliseconds from now.
01-21 19:00:27.183: W/Ads(26882): Failed to load ad: 2
01-21 19:01:27.208: I/Ads(26882): Starting ad request.
01-21 19:02:27.363: W/Ads(26882): Timed out waiting for ad response.
01-21 19:02:27.413: I/Ads(26882): Scheduling ad refresh 60000 milliseconds from now.
01-21 19:02:27.418: W/Ads(26882): Failed to load ad: 2
01-21 19:01:27.363: E/GooglePlayServicesUtil(26882): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
I am sure that I included all the things correct, but if you have any ideas what i have done false just say.
My code:
adView = (AdView)findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().addTestDevice("7DC393B415BE44EB0BBB77E514CE33C3").build();
adView.loadAd(adRequest);
My xml code:
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/crypt"
android:layout_alignParentBottom="true"
ads:adUnitId="ca-app-pub-4252022205312528/1824157895"
ads:adSize="BANNER"
/>
So I hope anyone can help me out with admob.