Android Admob 实现 : Get the error : "Google Play Services resources were not found"

标签 android admob

我尝试升级我的 AdMob 实现。使用 GoogleAdMobSDK,我想转换成 google-play-services-lib。

广告出现。所以看起来没问题,但我仍然在日志中的方法调用 loadAd() 中遇到此错误

    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.

这是我的 list :

  • 我将库项目导入我的工作区,复制源代码。
  • 我将库引用到我的项目中
  • 我在 list 中添加元数据

    <meta-data android:name="com.google.android.gms.version"
       android:value="@integer/google_play_services_version" />
    
  • 我的代码

    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 上进行测试。

我也尝试将 google-play-services-lib jar 放入属性中,但没有结果。

我想确保在提交我的应用程序之前可以处理此错误。

最佳答案

这是当前版本的 Google Play 服务的良性错误。 别担心。提交您的应用程序。睡一觉。

关于Android Admob 实现 : Get the error : "Google Play Services resources were not found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22152834/

相关文章:

android - Admob 横幅未显示

android - 如何获取 Admob 的设备 ID

Android:CardView 即将推出操作栏

android - Firebase 性能监控显示 0 个 session

java - Quickblox: sample 不会开始

java - MobileAds.initialize(Context, String) 已弃用

android - 在 Activity 中使用 ListView 进行底部导航

android - 如何在运行时添加操作栏项

android - Admob 横幅未在真实设备中显示

ios - Xcode 和 Unity 缺少库 'lGoogleUtilities'