I have made an Android app via the Cordova CLI. These are the steps I have taken :
- cordova create myApp com.myCompany.myApp myApp
- cd myApp
- cordova plugin add cordova-plugin-camera --save
- cordova platform add android --save
- cordova requirements android
- cordova build android --verbose
- cordova run android
Thanks to : https://www.npmjs.com/package/cordova
This runs fine. So now I try and add this plugin : https://github.com/appfeel/admob-google-cordova
So I do :
- cordova plugin add cordova-admob
This doesn't work as it comes back with this error :
Warning, could not copy necessary files for angular browser platfrom. Please ensure 'www/lib/angular-admob.js' exists ...
So I created an empty file named lib
in my www
folder. Remove the plugin :
- cordova plugin remove cordova-admob
Then re-add :
- cordova plugin add cordova-admob
This seemed to work. So now I build and get this error :
Now I have searched for the problem and come across this : Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23
The answer is as follows :
Your compile SDK version must match the support library's major version.
Since you are using version 23 of the support library, you need to compile against version 23 of the Android SDK.
Alternatively you can continue compiling against version 22 of the Android SDK by switching to the latest support library v22.
I'm not sure how to do this with the Cordova files I have, so my question is, how do I make sure that both the plugin and the android sdk are on the same versions ? If this even is my problem.