Android Admob实施:收到错误:“未找到Google Play服务资源”; [英] Android Admob implementation: Get the error : "Google Play Services resources were not found"
问题描述
我尝试升级AdMob的实现。我想使用GoogleAdMobSDK,转到google-play-services-lib。
I tried to upgrade my implementation of AdMob. Using the GoogleAdMobSDK, I would like to turn into the google-play-services-lib.
广告出现。看来还可以,但是我在日志中的方法调用loadAd()上仍然遇到此错误
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.
这是我的清单:
- 我在工作区中导入库项目,复制源。
- 我将库引用到我的项目中
-
我在清单中添加了元数据
- 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);
我的应用程序在9中的目标版本( 2.3)。我在使用KitKat版本的Nexus 5上进行了测试。
The target version for my app in 9 (2.3). I test on Nexus 5 with KitKat version.
我也尝试将google-play-services-lib jar放入属性,但没有结果。
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.
推荐答案
这是当前版本的Google Play服务的良性错误。
不用担心。提交您的应用。睡觉吧。
This is a benign error with the current version of Google Play Services. Don't worry about it. Submit your app. Get some sleep.
这篇关于Android Admob实施:收到错误:“未找到Google Play服务资源”;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!