ratson / cordova-plugin-admob-free

New development has been moved to "admob-plus-cordova", https://github.com/admob-plus/admob-plus/tree/master/packages/cordova
https://github.com/admob-plus/admob-plus
MIT License
498 stars 212 forks source link

Class not found (anonymous) @ main.js:1986 #311

Open DooDiddle opened 5 years ago

DooDiddle commented 5 years ago

Class not found error returned here:

return this.admobFree.banner.prepare() .then(function () { _this.bannerPrepared = true; console.log('AdMob Banner Ad is prepared, will be presented if autoShow is true, otherwise, call showBanner().'); }) .catch(function (err) { console.error(err); alert(err); });

My package.json has: "@ionic-native/admob-free": "^5.0.0-beta.21", "cordova-admob-sdk": "^0.20.0", "cordova-plugin-admob-free": "^0.21.0",

Using ionic 4 and capacitor

DooDiddle commented 5 years ago

Any help? This happened after I have updated cordova-plugin-admob-free to version 0.21.0 Is it because the version doesn't match cordova-admob-sdk which is version 0.20.1? Are the versions supposed to match for this to work?

sholatunji commented 5 years ago

@DooDiddle not sure if you fixed it, but I had the same problem this morning and I have to remove the plugin, and remove/re-add the flatform(Android).