pro Guard 不显示 admob 广告 [英] admob ads are not shown with pro guard

查看:41
本文介绍了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 广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆