【问题标题】:Interstitial not showing after ProguardProguard 后未显示插页式广告
【发布时间】:2013-11-15 22:19:19
【问题描述】:

我正在更新到新版本的 Google Play 服务,其中现在包含 AdMob 库。 (此外,您似乎必须更改为包含的 AdMob api,因为you cannot also include the old AdMob .jar。)

问题:当我直接从 Eclipse 运行调试版本时,插页式广告按应有的方式显示,当我在不使用 Proguard 的情况下导出 .apk 时,插播式广告按应有的方式显示,但是当我通过 Proguard 运行时,它们不再显示。在应该显示广告时,我在日志中得到了这个:

11-04 21:05:35.023: W/Ads(27590): Could not get info for ad overlay.
11-04 21:05:35.078: W/InputMethodManagerService(261): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4205b940 attribute=null

横幅广告有效,但插页式广告无效。我尝试将-keep class com.google.** 添加到progruad-project.txt,但这并没有帮助。有谁知道解决办法吗?

【问题讨论】:

    标签: admob proguard google-play-services


    【解决方案1】:

    我遇到了完全相同的问题。我通过将此行添加到 proguard-project.txt 来解决它:

     -keep public class com.google.** {*;}
    

    如果使用中介,还需要添加以下行:

    -keep public class yourMediationAdNetwork.* {
      public <fields>;
      public <methods>;
    }
    

    为您的广告网络替换“yourMediationAdNetwork”。例如,如果您使用“AppFlood”:

    -keep public class com.appflood.* {
      public <fields>;
      public <methods>;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多