-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More than one library with package name 'com.google.android.gms.license' #857
Comments
Add config in android/build.gradle
|
Thank @sy92th . It Worked for Me |
@sy92th it worked for me too, but I use 11.8.0 so yeah |
@sy92th It worked for me too. |
Today, google released version 12.0.0 for library "com.google.firebase".
react-native-fcm will use last version of "com.google.firebase:firebase-core " and "com.google.firebase:firebase-messaging" |
Hi guys, I've made a perm fix for this @ #859! You can easily fix this (by defining your own google services version) by adding Do let me know if there are any issues! |
@sy92th thanks! |
@sy92th Thanks a lot! |
@sy92th Thanks. save my day |
it works but after that my Android App crashes on starting #861 |
I am getting `Error:Execution failed for task ':react-native-camera:processReleaseResources'.
Please let me know solution to fix this. |
@kkarmalkar you will have to make the same changes for the gradle file in react-native-camera. |
@yangtaufoo Can you please paste exact (sample) lines to add in gradle file |
@kkarmalkar react-native-camera/react-native-camera#1370 (comment) please refer to this for the fix |
I added this code in the end of
did i miss anything? Error:
|
@petro-shkuratenyuk you need to paste a snippet of your error. However, i would assume that some other libraries do have google play dependencies too. They also need to fix their gradle files. |
guys, please refer to the fix: #859 |
Just check where you are using the library and don't use the latest version. Check it out:
At least until it is fixed, I'll use like this. |
I think my problem comes from Onesignal. Anyone else who is using onesignal? |
the fix is analogous to any packages that have the issue. just make sure you do not have any google related dependencies defined with “+” |
@yangtaufoo I'm still a bit confused. |
@evollu You have to add the ext object with the property(s) you wish to override in your android/build.gradle (Reference: https://developer.android.com/studio/build/gradle-tips.html#configure-project-wide-properties) |
@yangtaufoo I mean what is the root cause of |
@evollu Google updated their Google API for Android (https://developers.google.com/android/guides/releases) and it caused multiple libraries to fail, still trying to find what’s the root cause. Will get back once I’ve got an answer but using an old version is the best fix for now as the wildcard “+” will choose the latest at 12.0.0. Edit: I have a gut feeling it’s related to this. (https://stackoverflow.com/questions/48365687/gradle-exclude-group-from-compile). Might want to look into it by using it in the test example |
My approach is scan all android project and update version of google play services directly to each module build.gradle |
@mcconkiee You can override it see this |
Non of above works for me :( After all this resolve issue
android/build.grandle |
work Perfect for me Thanks a lo. |
sorted out... thanks |
@yangtaufoo can you point me some document regarding what I need to do for playservice v12? |
if all above doesn' t work try this
|
platform/android/build.gradle |
Hi I have one question about editing the files. |
Hi, You can edit it, directly and Sync your Project, I mean in Android
Studio of course.
Regards.
…On Thu, Mar 22, 2018 at 9:25 PM, huoguoislife ***@***.***> wrote:
Hi I have one question about editing the files.
Can we directly edit the build.gradle file or do we need any other tools
to do it?
Thank you !
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#857 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aa17l-UAIc7l87pWx1Qvszqci7H1iY7Xks5thE8cgaJpZM4Sy4gS>
.
|
Thank you !! I will try it now :)) |
Regards, I hope this to help you.
El mar 22, 2018 9:28 PM, "huoguoislife" <notifications@github.com> escribió:
… Thank you !! I will try it now :))
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#857 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aa17l-A361de9fWLU2JcCTLr-HuMWlRLks5thE_ZgaJpZM4Sy4gS>
.
|
This works for me in
|
@evollu It will take some time as I'm not very familiar with the Google API framework and your library |
This is my medium post on how to upgrade to solve the issue. |
@tobob thank you boss, its working like charm! |
I was working on Ionic pro package and still can not solve this problem after trying all the solutions above. Somehow using the command $cordova build android it succeed and generate the apk file I need. Not sure where or what the problem is. |
however I now don't use my resolution, I did update package to latest version and it works well |
@sy92th It worked for me too. I just had to add to discover that I just printed the gradle dependency graph and looked the 12.0.0 occurences |
but if i want to use the 12.0.0 version? As we know fire functions is avaiable since 12. is there a way to solve that without downgrading? |
Updating gradle to 4.1 seems to solve all conflicts.. |
@cubissimo Indeed, I ubgraded to gradle 4.6, and using Google Play Services 12.0.0 built just fine. Thanks! |
All, Whilst forcing the versions to be lower than v12 works (as above) this isn't a long term solution and you'll eventually be unable to use some libraries that do keep up to date with GMS versions such as ourselves ( The recommended approach would be to update your android project to use the latest gradle wrapper and android build tools, here's some instructions taken from our React Native Firebase v4 change log to help you do this: Upgrading gradle and Android build toolsDue to some breaking changes in v12 of the Android libs, you'll need to upgrade your Gradle version to at least v4.4 and make a few other tweaks as follows:
Patching outdated RN modulesIn an ideal world RN modules are all kept up to date on gradle dependencies and such; but in the real world most might never upgrade their GMS versions/gradle build files, this isn't the end of the line though. You can successfully patch any of the modules you want to change the versions / dependency definitions of (e.g. to use the new gradle api/implementation/compileOnly syntax) using the patch-package npm module. It's pretty straight-forward:
Links for reference: |
@tobob thanks, this worked for me, additionaly I changed this in my package.json |
below is my manifest file
|
below is my gradle configuration android {
} |
During the build I received this error message:
Execution failed for task ':react-native-fcm:processReleaseResources'.
The text was updated successfully, but these errors were encountered: