Error adding admob plugin


#1

I’d like to use the admob cordova plugin (I’m trying with the one in https://github.com/appfeel/admob-google-cordova). I’ve tried with:

$ ionic plugin add com.admob.google
$ ionic plugin add https://github.com/appfeel/admob-google-cordova

I’m getting the following error:

Fetching plugin "com.admob.google" via plugin registry
npm http GET http://registry.cordova.io/com.admob.google
npm http 304 http://registry.cordova.io/com.admob.google
Installing "com.admob.google" for android
Error during processing of action! Attempting to revert...
Failed to install 'com.admob.google':Error: Uh oh!
"/Volumes/DATA/IonicApp/platforms/android/libs/android-support-v4.jar" already exists!
    at Object.module.exports.common.copyNewFile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:58:19)
    at module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:51:20)
    at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:72:25)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:591:20)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:340:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:526:49
    at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
Error: Uh oh!
"/Volumes/DATA/IonicApp/platforms/android/libs/android-support-v4.jar" already exists!
    at Object.module.exports.common.copyNewFile (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/common.js:58:19)
    at module.exports.source-file.install (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/platforms/android.js:51:20)
    at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/action-stack.js:72:25)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:591:20)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:340:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:526:49
    at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)

#2

I’m the maintainer of the plugin. It was a plugin issue (there was a conflict when another plugin had already installed android-support-v4.jar).

It’s been solved and should work right now.


#3

Thanks, I’ve tried again and now it works like a charm, great plugin!