Error when building locally in Cordova after adding cordova-plugin-admobpro

192 Views Asked by At

I have upgraded my Cordova CLI development environment to the latest versions. But still obtaining this error so I can't build my project:

The command:

cordova build android

The error message:

Error: Project contains at least one plugin that requires a system library. This is not supported with ANT. Palease build using gradle.

Anybody knows a solution? Thanks in advance.

1

There are 1 best solutions below

1
Miquel On

cordova-admob plugin author here.

As seen from your comment, you have problems with gradle. Maybe recreating the environment from scratch could help. Other thing you can try is to add the plugin at https://github.com/appfeel/phonegap-admob

cordova plugin add https://github.com/appfeel/phonegap-admob

This is a mirror from cordova-admob but just changing the dependency method (this uses ant which makes it compatible with Phonegap Build).