【问题标题】:The type AdListener cannot be a superinterface of GameActivityAdListener 类型不能是 GameActivity 的超接口
【发布时间】:2016-11-21 09:41:51
【问题描述】:

我想通过 google play services lib 更改 GoogleAdMobAdsSdk,但是当我删除 GoogleAdMobAdsSdk 时,我遇到了这个错误:AdListener 类型不能是 GameActivity 的超接口;超接口必须是接口。

你能帮帮我吗!

PS:你可以在这里找到一部分代码:migrate to new google play service lib

提前谢谢你!

【问题讨论】:

    标签: javascript java eclipse admob google-play-services


    【解决方案1】:

    根据新SDKGoogle Play Services

    您不再从您的活动或课程中实现AdListener。您可以将其用作adMob listener 的内部类:

    adView.setAdListener(new AdListener() {
    public void onAdLoaded() {}
    public void onAdFailedToLoad(int errorcode) {}
    // Only implement methods you need.
    });
    

    这里有一个相关的 SO 票解决了这个问题 superinterface must be an interface: "The type B cannot be a superinterface of C; a superinterface must be an interface" error

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-13
      • 2013-04-14
      • 2015-10-27
      • 1970-01-01
      • 1970-01-01
      • 2011-09-08
      • 2021-10-11
      相关资源
      最近更新 更多