Skip to content

Difference of Plugin IDs

Raymond Xie edited this page Jun 21, 2015 · 16 revisions

Here is the github repo, the project home of this plugin to maintain the versions and history.

Besides, the plugin is also published to two online repo:

If you use Cordova CLI older than v5.0, it can download the plugin from cordova plugin registry, with id: com.google.cordova.admob.

It use google-play-services.jar in a external plugin: com.google.playservices (https://github.com/MobileChromeApps/google-play-services)

Since cordova CLI v5.0, cordova team announced npm is also supported and plan to deprecate cordova plugin registry in 6 months, and suggest plugins to be migrated to npm repo, and follow the new name rule, so it's new package id is renamed to: cordova-plugin-admobpro.

And, to simplify dependency, new cordova CLI allow adding support to use the google-play-services.jar in your default android SDK with tag framework.

<framework src="com.google.android.gms:play-services-ads:+" />

And make sure the library & repository installed in your Andorid SDK manager, see: android sdk frameworks

FAQ

1. Build fail when use cordova-plugin-admobpro in PhoneGap Build/Intel SDK ...

Only cordova CLI v5.x and newer support loading cordova-pluign-admobpro from npm.

Some tools or build services (PhoneGap Build, Intel XDK, Microsoft VS2005, etc.) are still using old version of cordova CLI and did not support it welll yet. A bug report is created to PhoneGap build service, see: https://github.com/phonegap/build/issues/439

Currently, using the old plugin id com.google.cordova.admob is a workaround.

2. Why Cordova CLI fail install the plugin with 404 Not found?

You are using a old version of Cordova CLI.

Cordova team announced npm repo is supported since cordova CLI v5.0

Only Cordova CLI v5.x and later support loading plugin from npm. Please upgrade your cordova CLI:

[sudo] npm install -g cordova

3. Build error with message "Multiple dex files define Lcom/google/..."

Caused by duplicated google-play-services.jar.

This plugin properly referenced to the google-play-services.jar in your android sdk with tag framework , which is recommended by Google team.

While some other plugins contains the jar, or depends on a plugin named com.google.playservices which is already deprecated.

Please list all plugins and check which plugin use it improperly, then report a bug to that plugin.

4. Build error with message "Not found com.google.android.gms:play-services-ads:+"

Google play services library or repository is not installed in your android SDK.

Type android sdk & to launch your Android SDK manager, check and confirm the items are installed.

See: android sdk frameworks