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
494 stars 210 forks source link

package com.google.android.gms.ads does not exist #179

Open sashastg opened 6 years ago

sashastg commented 6 years ago

i had created new cordova project. then "cordova plugin add cordova-plugin-admob-free --save"

and i got errors, thats missed libs. package com.google.android.gms.ads does not exist. screenshot attached.

screenshot at mar 11 16-01-59

ghost commented 6 years ago

Same issue

kundurahulkundu commented 6 years ago

Hi, I am getting same issue. Can anybody help me to fix this.

kundurahulkundu commented 6 years ago

Finally I resolved this issue. Root cause Current version of this plugin needs cordova-admob-sdk as a dependency. But cordova-admob-sdk needs Cordova Android 6.3.0 which is available in Cordova 7.1.0 or latter. If your Cordova version is earlier to this version then cordova-admob-sdk dependency install will be skipped while installing cordova-plugin-admob-free. Now if you try to build the project the above issue will appear.

Resolution Remove android platform and cordova-plugin-admob-free plugin. Then update cordova to 7.1.0 and add the platform and plugin again. This will resolve the issue.

Note If you are running older command line Android SDK (25.x.x) like me, you will face issue "gradle not found" while running "cordova run android". To fix this issue install gradle in your system (even if it exists in you Android SDK folder).

ghost commented 6 years ago

Thanks, @kundurahulkundu