I tried to upgrade my implementation of AdMob. Using the GoogleAdMobSDK, I would like to turn into the google-play-services-lib.
The ad appears. So it seems ok, but I still got this error at the method call loadAd() in log
Requesting resource 0x7f0c000d failed because it is complex
GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
Here's my checklist:
- I import the library project in my workspace, copying the source.
- I reference the library into my project
I add the meta-data in the Manifest
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
My code
this.request = new AdRequest.Builder().addTestDevice(id).build(); this.adView = new AdView(context); this.adView.setAdUnitId(MY_AD_UNIT_ID); this.adView.setAdSize(AdSize.SMART_BANNER); ... this.adView.loadAd(request);
The target version for my app in 9 (2.3). I test on Nexus 5 with KitKat version.
I also tried to put the google-play-services-lib jar in the properties, but no result.
I want to be sure that this error could be handle before submit my app.