# Ionic admob plugin error

**URL:** <https://forum.ionicframework.com/t/ionic-admob-plugin-error/94236>\
**Category:** Ionic Native\
**Created:** [June 14, 2017, 7:47am UTC](https://forum.ionicframework.com/t/ionic-admob-plugin-error/94236 "2017-06-14T07:47:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![buldurmert](https://avatars.discourse-cdn.com/v4/letter/b/ba9def/32.png) [@buldurmert](https://forum.ionicframework.com/u/buldurmert)\
**Post date:** [June 14, 2017, 7:47am UTC](https://forum.ionicframework.com/t/ionic-admob-plugin-error/94236/1 "2017-06-14T07:47:29Z")

</div>

```auto
✖ Running command - failed!

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova build android (exit code 1):

        (truncated) ... un/cordova/admob/AdMobPlugin.java:112: error: cannot find symbol
        adSize = new AdSize(adWidth, adHeight);
        ^
        symbol: variable adHeight
        location: class AdMobPlugin
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:146:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:154:
        error: cannot find symbol
        PublisherAdView ad = new PublisherAdView(getActivity());
        ^
        symbol: method getActivity()
        location: class AdMobPlugin
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:160:
        error: cannot find symbol
        AdView ad = new AdView(getActivity());
        ^
        symbol: method getActivity()
        location: class AdMobPlugin
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:168:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:189:
  error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:192:
        error: cannot find symbol
        return sz.getWidthInPixels(getActivity());
        ^
        symbol: method getActivity()
        location: class AdMobPlugin
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:195:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:198:
        error: cannot find symbol
        return sz.getHeightInPixels(getActivity());
        ^
        symbol: method getActivity()
        location: class AdMobPlugin
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:201:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:214:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:227:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:242:
  symbol: method getActivity()
        location: class AdMobPlugin
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:261:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:274:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:293:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:303:
        error: method does not override or implement a method from a supertype
        @Override
        ^
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:308:
        error: cannot find symbol
        RewardedVideoAd ad = MobileAds.getRewardedVideoAdInstance(getActivity());
        ^
        symbol: method getActivity()
        location: class AdMobPlugin
        /Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM
obPlugin.java:326:
        error: method does not override or implement

```

symbol: method getActivity()  
location: class AdMobPlugin  
/Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM  
obPlugin.java:261:  
error: method does not override or implement a method from a supertype  
@Override  
^  
/Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM  
obPlugin.java:274:  
error: method does not override or implement a method from a supertype  
@Override  
^  
/Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM  
obPlugin.java:293:  
error: method does not override or implement a method from a supertype  
@Override  
^  
/Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM  
obPlugin.java:303:  
error: method does not override or implement a method from a supertype  
@Override  
^  
/Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM  
obPlugin.java:308:  
error: cannot find symbol  
RewardedVideoAd ad = MobileAds.getRewardedVideoAdInstance(getActivity());  
^  
symbol: method getActivity()  
location: class AdMobPlugin  
/Users/mertbuldur/Desktop/ionic/app1/platforms/android/src/com/rjfun/cordova/admob/AdM  
obPlugin.java:326:  
error: method does not override or implement Ionic cordova build is like this.

---

<div class="post-metadata">

**Author:** ![junjunhernandez](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@junjunhernandez](https://forum.ionicframework.com/u/junjunhernandez)\
**Post date:** [May 31, 2018, 9:39pm UTC](https://forum.ionicframework.com/t/ionic-admob-plugin-error/94236/3 "2018-05-31T21:39:06Z")

</div>

Were you able to solve this? I also need a solution. I encountered the supertype @Override error when I added the admob free plugin by ratson.

---

<div class="post-metadata">

**Author:** ![anna\_liebt](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@anna\_liebt](https://forum.ionicframework.com/u/anna_liebt)\
**Post date:** [May 31, 2018, 11:07pm UTC](https://forum.ionicframework.com/t/ionic-admob-plugin-error/94236/4 "2018-05-31T23:07:06Z")

</div>

hello,  
ionic and admob… what a mess. This is one of the reason why I think twice, if I use ionic again for whatever and mostly …

But this will not help you.

Maybe [https://enhance.co/](https://enhance.co/) is something you can use. It is for me a complete black box, so I do not know if this way has any negative and unwanted effects.

Best regards, anna-liebt

---

<div class="post-metadata">

**Author:** ![junjunhernandez](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@junjunhernandez](https://forum.ionicframework.com/u/junjunhernandez)\
**Post date:** [May 31, 2018, 11:33pm UTC](https://forum.ionicframework.com/t/ionic-admob-plugin-error/94236/5 "2018-05-31T23:33:42Z")

</div>

@anna_liebt This thread is for the answer to the “ionic and admob” error and not for marketing whatsoever. The question is clear for “ionic and admob”.
