{"id":23338748,"url":"https://github.com/appfeel/cordova-play-services-version-adapter","last_synced_at":"2025-04-09T22:32:21.134Z","repository":{"id":57207656,"uuid":"154321122","full_name":"appfeel/cordova-play-services-version-adapter","owner":"appfeel","description":"Cordova/Ionic Google Play Services Versions Incompatibility Adapter","archived":false,"fork":false,"pushed_at":"2020-05-21T10:01:38.000Z","size":50,"stargazers_count":6,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T10:01:37.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appfeel.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-23T12:05:46.000Z","updated_at":"2025-01-27T06:26:51.000Z","dependencies_parsed_at":"2022-09-11T05:30:28.611Z","dependency_job_id":null,"html_url":"https://github.com/appfeel/cordova-play-services-version-adapter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfeel%2Fcordova-play-services-version-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfeel%2Fcordova-play-services-version-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfeel%2Fcordova-play-services-version-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appfeel%2Fcordova-play-services-version-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appfeel","download_url":"https://codeload.github.com/appfeel/cordova-play-services-version-adapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248123621,"owners_count":21051502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-21T03:16:18.493Z","updated_at":"2025-04-09T22:32:21.109Z","avatar_url":"https://github.com/appfeel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"*\u003cp style=\"font-size: small;text-align:right;\" align=\"right\"\u003e\u003ca style=\"color:#232323\" color=\"#232323\" href=\"http://appfeel.com\"\u003eMade in Barcelona with \u003cspan style=\"color:#FCB\" color=\"#FCB\"\u003e\u0026lt;3\u003c/span\u003e and \u003cspan style=\"color:#BBCCFF\" color=\"#BBCCFF\"\u003eCode\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e*\n\nCordova Google Play Services / Firebase versions adapter\n================================================\n\nMany plugins use Google Play Services or Firebase and some of them are stick to a concrete version:\n\n- [Cordova plugin Admob](https://github.com/appfeel/admob-google-cordova) latest\n- [Google analytics plugin](https://github.com/appfeel/analytics-google) latest\n- [Phonegap plugin push](https://github.com/phonegap/phonegap-plugin-push) 11.6.2\n- [Google maps](https://github.com/mapsplugin/cordova-plugin-googlemaps) 15.0.1\n\nWhen some or all of these plugins are used together, this may cause incompatibilities and the application will fail to build (see issues in https://github.com/appfeel/admob-google-cordova/issues/97, https://github.com/phonegap/phonegap-plugin-push/issues/2511, https://github.com/phonegap/phonegap-plugin-push/issues/2360).\n\nThis is because all plugins that use Google Play Services in an application must be using the same version. It's also not possible to decrease the version of Google Play Services because there may be unnimplemented features in lower versions that are required by the plugin.\n\nThis plugin will analyze all libraries being used by the application, see which is the version that most of them are compatible with and align the versions. All of this is done transparently, so the developer doesn't need to take care on which is the Google Play Services version that will compatibilize the different plugins. So it allows to add many different plugins using different Google Play Services without worrying anymore about the different Google Play Services library versions mess.\n\nSimply install this plugin and it will take care of optimizing the versions of Google Play Services at prepare, compile or run time.\n\n- [Quick start](#quick-start)\n- [How it works](#how-it-works)\n        - [Success example:](#success-example)\n        - [Error example:](#error-example)\n- [Common problems that this plugin can fix](#common-problems-that-this-plugin-can-fix)\n- [Other plugins you may be interested on](#other-plugins-you-may-be-interested-on)\n- [Credits](#credits)\n- [License](#license)\n\n## Quick start ##\n\nTo install this plugin, read the [Command-line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface) and use one of the following command lines:\n\n* `cordova plugin add cordova-play-services-version-adapter`\n* `ionic cordova plugin add cordova-play-services-version-adapter`\n\n---\n## How it works ##\n\nAs soon as the application compiles, all versions of Google Play Services plugins are automatically aligned, showing up a final report about compatibilization changes carried out.\n\n\n#### Success example:\n```\n'Cordova Play Services Version Adapter' has successfully applied the following changes:\n    - 'com.google.android.gms:play-services-analytics:+' =\u003e 15.0.0\n    - 'com.google.android.gms:play-services-maps:15.0.1' =\u003e 15.0.0\n    - 'com.google.android.gms:play-services-location:15.0.1' =\u003e 15.0.0\n    - 'com.google.firebase:firebase-messaging:11.6.2' =\u003e 15.0.0\n```\n\n#### Error example:\n```\n'Cordova Play Services Version Adapter' has detected an error. The following dependencies of 'Google Play Services' are not compatible:\n    - 'com.google.android.gms:play-services-ads:17.0.0'\n    - 'com.google.android.gms:play-services-analytics:+'\n    - 'com.google.android.gms:play-services-maps:15.0.1'\n    - 'com.google.android.gms:play-services-location:15.0.1'\n    - 'com.google.firebase:firebase-messaging:11.6.2'\n\nIt doesn't exists a version of 'Google Play Services' that includes all these dependencies.\nAll dependencies of 'Google Play Services' must have the same version.\nThe application may not compile.\n```\n\n## Common problems that this plugin can fix\n\ncom.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzez;\n\n```\nDex: Error converting bytecode to dex:\nCause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzez;\n    UNEXPECTED TOP-LEVEL EXCEPTION:\n    com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzez;\n\ncom.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzez;\n     at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:661)\n     at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:616)\n     at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:598)\n     at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)\n     at com.android.dx.merge.DexMerger.merge(DexMerger.java:198)\n     at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:61)\n     at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:36)\n     at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)\n     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)\n     at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)\n     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)\n     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)\n\nFAILURE: Build failed with an exception.\n\n* What went wrong:\nExecution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.\n\u003e com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzez;\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\n\n* Get more help at https://help.gradle.org\n\nBUILD FAILED in 43s\n:app:transformDexArchiveWithDexMergerForDebug FAILED\n39 actionable tasks: 29 executed, 10 up-to-date\n(node:15297) UnhandledPromiseRejectionWarning: Error: .../platforms/android/gradlew: Command failed with exit code 1Error output:\nNote: Some input files use or override a deprecated API.\nNote: Recompile with -Xlint:deprecation for details.\nNote: Some input files use or override a deprecated API.\nNote: Recompile with -Xlint:deprecation for details.\nNote: .../platforms/android/app/src/main/java/com/adobe/phonegap/push/PushPlugin.java uses unchecked or unsafe operations.\nNote: Recompile with -Xlint:unchecked for details.\nDex: Error converting bytecode to dex:\nCause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzez;\n    UNEXPECTED TOP-LEVEL EXCEPTION:\n    com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzez;\n\ncom.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzez;\n     at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:661)\n     at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:616)\n     at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:598)\n     at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)\n     at com.android.dx.merge.DexMerger.merge(DexMerger.java:198)\n     at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:61)\n     at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:36)\n     at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)\n     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)\n     at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)\n     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)\n     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)\n```\n\nAll firebase libraries must be either above or below 14.0.0\n\n```\n(node:14071) UnhandledPromiseRejectionWarning: Error: .../platforms/android/gradlew: Command failed with exit code 1Error output:\nFAILURE: Build failed with an exception.\n\n* Where:\nScript '.../platforms/android/cordova-support-google-services/dev-build.gradle' line: 16\n\n* What went wrong:\nA problem occurred evaluating project ':app'.\n\u003e Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']\n   \u003e All firebase libraries must be either above or below 14.0.0\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\n\n* Get more help at https://help.gradle.org\n\nBUILD FAILED in 1s\n    at ChildProcess.whenDone (.../platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)\n    at emitTwo (events.js:126:13)\n    at ChildProcess.emit (events.js:214:7)\n    at maybeClose (internal/child_process.js:925:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)\n(node:14071) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)\n(node:14071) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.\n```\n\n\nFailed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']\n\n```\n(node:15968) UnhandledPromiseRejectionWarning: Error: .../platforms/android/gradlew: Command failed with exit code 1Error output:\nFAILURE: Build failed with an exception.\n\n* Where:\nScript '.../platforms/android/cordova-support-google-services/dev-build.gradle' line: 16\n\n* What went wrong:\nA problem occurred evaluating project ':app'.\n\u003e Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']\n   \u003e For input string: \"+\"\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\n\n* Get more help at https://help.gradle.org\n\nBUILD FAILED in 1s\n    at ChildProcess.whenDone (.../platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)\n    at emitTwo (events.js:126:13)\n    at ChildProcess.emit (events.js:214:7)\n    at maybeClose (internal/child_process.js:925:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)\n(node:15968) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)\n(node:15968) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.\n```\n\n\nVersion: x.y.z is lower than the minimum version (9.0.0) required for google-services plugin.\n\n```\n(node:14939) UnhandledPromiseRejectionWarning: Error: .../platforms/android/gradlew: Command failed with exit code 1Error output:\nFAILURE: Build failed with an exception.\n\n* Where:\nScript '.../platforms/android/cordova-support-google-services/dev-build.gradle' line: 16\n\n* What went wrong:\nA problem occurred evaluating project ':app'.\n\u003e Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']\n   \u003e Version: 6.8.0 is lower than the minimum version (9.0.0) required for google-services plugin.\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\n\n* Get more help at https://help.gradle.org\n\nBUILD FAILED in 2s\n    at ChildProcess.whenDone (.../platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)\n    at emitTwo (events.js:126:13)\n    at ChildProcess.emit (events.js:214:7)\n    at maybeClose (internal/child_process.js:925:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)\n(node:14939) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)\n(node:14939) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.\n```\n\n---\n## Other plugins you may be interested on\n\n- [Ionic/Cordova Admob monetization](https://github.com/appfeel/admob-google-cordova)\n- [Ionic/Cordova In app purchase]()\n- [Ionic/Cordova Google Analytics](https://github.com/appfeel/analytics-google)\n\n---\n## Credits ##\n\n* [appFeel](http://www.appfeel.com)\n\n---\n## License ##\n```\nThe MIT License\n\nCopyright (c) 2018 AppFeel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappfeel%2Fcordova-play-services-version-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappfeel%2Fcordova-play-services-version-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappfeel%2Fcordova-play-services-version-adapter/lists"}