Cordova - Install AdMob Plugin on Android Failed (Mac)

user2120121

I am facing thi error in installing AdMob cordova plugin on android https://github.com/floatinghotpot/cordova-plugin-admob ,, The plugin is installed and works fine with iOS platform, but it gives this error on android.

My Enviroment:

Fetching plugin "https://github.com/floatinghotpot/cordova-plugin-admob.git" via git clone Installing "com.rjfun.cordova.plugin.admob" for android Fetching plugin "com.google.admobsdk" via plugin registry Installing "com.google.admobsdk" for android Fetching plugin "[email protected]" via plugin registry Failed to install 'com.google.admobsdk':Error: Expected fetched plugin to have ID "[email protected]" but got "com.google.playservices". at checkID (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:116:19) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:99:24 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:574:44 at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17) at process._tickCallback (node.js:419:13) Failed to install 'com.rjfun.cordova.plugin.admob':Error: Expected fetched plugin to have ID "[email protected]" but got "com.google.playservices". at checkID (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:116:19) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:99:24 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:574:44 at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17) at process._tickCallback (node.js:419:13) Error: Expected fetched plugin to have ID "[email protected]" but got "com.google.playservices". at checkID (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:116:19) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:99:24 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:574:44 at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17) at process._tickCallback (node.js:419:13)

Any ideas?! Thanks in advance

Raymond Xie

The simple answer is:

You need upgrade to cordova CLI v4.0, just run:

sudo npm install cordova -g

The detailed answer is:

The root cause of this failure is, cordova CLI v3.5 does not correctly recognize the following dependency in plugin com.google.admobsdk.

<dependency id="[email protected]"/>

You may ask, why @19.0.0 is added?

It's used to specify an exact version, and keep it compatible with cordova CLI and Intel XDK.

As the default com.google.playservices (@21.0.0) cannot be handled by Intel XDK (at least so far, when this answer is being posted), while version [email protected] can be correctly handled by Intel XDK.

Some bugs in cordova v3.5 causes this problem and has been fixed in cordova v4.0, mentioned as "Pinned dependencies" in the release notes.

See release notes: http://cordova.apache.org/announcements/2014/10/16/cordova-4.html

So, please upgrade to cordova CLI v4.0, it will be much easier.

If any issue, please ask in the project issue tracker page, you will be supported timely.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cordova - Install AdMob Plugin on Android Failed (Mac)

From Dev

Failed to install 'cordova-plugin-facebook4'

From Dev

Android target: not installed and plugin installation failed Cordova

From Dev

Cordova adding platform: Failed to install 'cordova-plugin-whitelist' CordovaError: Requirements check failed for JDK 1.8 or greater

From Dev

How to install cordova plugin in android studio and develop android projects?

From Dev

How to install cordova plugin in android studio and develop android projects?

From Dev

Cordova notification plugin failed installation (Cordova 3.6)

From Dev

install cocoapods failed on mac

From Dev

install cocoapods failed on mac

From Dev

Android admob failed to load ad

From Dev

install a phonegap plugin in a cordova project

From Dev

Cordova: where and how install a plugin?

From Dev

Android cordova plugin : NoClassDefFoundError

From Dev

Cordova android plugin debugging

From Dev

Cordova Android Install On Linux

From Dev

Cordova and AdMob

From Dev

Failed to add Push Notification Plugin into cordova

From Dev

How to debug a cordova plugin for Android

From Dev

Add a dependency to an Android Cordova plugin

From Dev

Cordova Plugin for Native Android App

From Dev

Android Studio cordova Push plugin

From Dev

Cordova plugin with id 'android' not found

From Dev

Cordova Plugin Whitelist Failed asking for cordova ios 4

From Dev

How can I install the facebookconnect cordova plugin?

From Dev

how to install cordova plugin from a zip file

From Dev

Cordova 2.9.0 how to install statusbar plugin

From Dev

Install cordova plugin for ONE platform only

From Dev

Difference between ionic and cordova plugin install

From Dev

PhoneGap Cordova Media Plugin - How to integrate/install?

Related Related

  1. 1

    Cordova - Install AdMob Plugin on Android Failed (Mac)

  2. 2

    Failed to install 'cordova-plugin-facebook4'

  3. 3

    Android target: not installed and plugin installation failed Cordova

  4. 4

    Cordova adding platform: Failed to install 'cordova-plugin-whitelist' CordovaError: Requirements check failed for JDK 1.8 or greater

  5. 5

    How to install cordova plugin in android studio and develop android projects?

  6. 6

    How to install cordova plugin in android studio and develop android projects?

  7. 7

    Cordova notification plugin failed installation (Cordova 3.6)

  8. 8

    install cocoapods failed on mac

  9. 9

    install cocoapods failed on mac

  10. 10

    Android admob failed to load ad

  11. 11

    install a phonegap plugin in a cordova project

  12. 12

    Cordova: where and how install a plugin?

  13. 13

    Android cordova plugin : NoClassDefFoundError

  14. 14

    Cordova android plugin debugging

  15. 15

    Cordova Android Install On Linux

  16. 16

    Cordova and AdMob

  17. 17

    Failed to add Push Notification Plugin into cordova

  18. 18

    How to debug a cordova plugin for Android

  19. 19

    Add a dependency to an Android Cordova plugin

  20. 20

    Cordova Plugin for Native Android App

  21. 21

    Android Studio cordova Push plugin

  22. 22

    Cordova plugin with id 'android' not found

  23. 23

    Cordova Plugin Whitelist Failed asking for cordova ios 4

  24. 24

    How can I install the facebookconnect cordova plugin?

  25. 25

    how to install cordova plugin from a zip file

  26. 26

    Cordova 2.9.0 how to install statusbar plugin

  27. 27

    Install cordova plugin for ONE platform only

  28. 28

    Difference between ionic and cordova plugin install

  29. 29

    PhoneGap Cordova Media Plugin - How to integrate/install?

HotTag

Archive