admob ads are not shown with pro guard(pro Guard 不显示 admob 广告)
问题描述
我开发了 android 应用程序并使用 admob sdk 6.2.1 来展示广告,当我在我的真实设备和模拟器上测试该应用程序时,会显示广告.但是当我对我的应用应用 pro Guard 并在我的设备上进行测试时(我也在其他设备上测试过)广告没有显示,请帮助!
I developed android app and I used admob sdk 6.2.1 for showing ads, and when I tested the app on my real device and on the emulator,ads are shown. but when I apply pro guard to my app and test it on my device(I tested it on another devices also) ads are not shown up, any help please!
推荐答案
将此添加到您的proguard:
Add this to your proguard:
-keep class com.google.ads.** # Don't proguard AdMob classes
-dontwarn com.google.ads.** # Temporary workaround for v6.2.1. It gives a warning that you can ignore
2020 年
一段时间以来,Google 移动广告 SDK 已经发布了自己的 proguard 规则,这些规则将清单合并到您的应用中,因此您无需自己添加任何内容.合并后的规则还保留了来自第三方中介适配器的方法,这些方法是使中介工作所需的.
For some time now, the Google Mobile Ads SDK has distributed its own proguard rules that get manifest merged into your app, so you don't need to add anything yourselves. The merged rules also keep around methods from third-party mediation adapters that are needed to make mediation work.
这篇关于pro Guard 不显示 admob 广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:pro Guard 不显示 admob 广告


- android 4中的android RadioButton问题 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01