0

the error is :

The type AdListener cannot be a superinterface of FlyingPanda; a superinterface must be an interface

   public class FlyingPanda  extends Activity implements AdListener {

where is the problem i try to replace the implements kyeword by extends but the error still there.

need you help plz

1 Answers1

0

According to the docs,

You can no longer implement AdListener from your Activity or class

You can use it as an anonymous inner class:

For Interstitial ads:

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

And for banner ads

adView.setAdListener(new AdListener() {
  public void onAdLoaded() {}
  public void onAdFailedToLoad(int errorcode) {}
  // Only implement methods you need.
});
Nana Ghartey
  • 7,901
  • 1
  • 24
  • 26