Compatibility with react-native-firebase `Error: more than one library with package name 'com.google.android.gms.license'`
See original GitHub issueHello,
I’m trying to use this library along with react-native-firebase
in my project.
But when I try to compile, I’m getting the following error:
:react-native-push-notification:processReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-push-notification:processReleaseResources'.
> Error: more than one library with package name 'com.google.android.gms.license'
I believe your Android dependency compile 'com.google.android.gms:play-services-gcm:+'
needs to support Gradle versioning, kinda like:
https://github.com/rebeccahughes/react-native-device-info/blob/e2c877f461c4181113abb3ff8f6bb8dfe89de0fb/android/build.gradle#L30
so the clients have the option of explicitly setting a version for that dependency.
Other packages seem to be affected as well by this change: https://github.com/rebeccahughes/react-native-device-info/issues/365
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:16
Top Results From Across the Web
than one library with package name 'com.google.android.gms ...
Execution failed for task ':react-native-device-info:processReleaseResources'. Error: more than one library with package name 'com.google.
Read more >than one library with package name com.google.android.gms ...
I've faced this issue quite recently and the problem for me was that for some reason the android project.properties file was generated with ......
Read more >Firebase: Android build error with Error: more than one library ...
I am trying to build android apk, but the build command failed with error,. 'Error: more than one library with package name 'com.google.android....
Read more >Frequently Asked Questions - React Native Firebase
A common build time error when using libraries that require google play services is of the form: 'Failed on android with com.android.dex.DexException: Multiple...
Read more >Integrate Google Login in React Native (Android) apps with ...
Learn how to setup Google Login in React Native apps using Firebase. Connect Firebase to authenticate and test on android.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey mate,
I got same library as yours. I tried your suggestion. Now I could successfully build for Android.
I changed the
build.gradle
file in ./node_modules/react-native-push-notification/And in the main project
build.gradle
file in ./android/app/Also I added the version in
gradle.properties
file in ./android/It’s worth adding that switching to a forked version is not necessary to fix this issue (temporarily). I simply added the following to
android/build.gradle
That covers me because I’m only using
react-native-push-notification
so I only need GCM. If you use other things like maps or firebase you’ll need to add those as well