I am trying to use AdMob in my app.
I am using this : https://github.com/appfeel/admob-google-cordova
Following this tutorial : https://github.com/appfeel/admob-google-demo
I have downloaded the zip. Run it on device and got the following error message :
cordova-admob plugin not ready. Are you in desktop browser ? It won't work...
I investigated and found out the plugin isn't even installed. So I tried installing it via the CLI like so :
cordova plugin add cordova-admob
And I get the following messages :
cordova-admob: Warning, could not copy necessary files for angular browser platform.
cordova-admob: Please ensure 'www/lib/angular-admob/angular-admob.js' exists (you can copy it from 'plugins/cordova-admob/angular-admob.js')
I tried copying it from there and created a folder at the location www/lib/angular-admob
, as it wasn't there but I get build errors.
Anyone come across this ? I've been at this for weeks, on and off, trying to get the adMob to work for PhoneGap/Cordova but I keep getting different errors. I have tried this plugin :
https://github.com/floatinghotpot/cordova-admob-pro
That one worked great on the android emulator, but not when I, both, served it to my device via the phonegap desktop app and served it from CLI to my device.
Here's the error I am getting now :
When creating the project from scratch and following these steps :
cordova create AdMobTest || cordova platform add android || cordova plugin add cordova-admob || creating empty lib folder inside my project www folder || cordova plugin remove cordova-admob || cordova plugin add cordova-admob || cordova prepare android || cordova compile android || cordova run android --device –
I'm now getting this error :