-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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' #18479
Comments
Thanks for posting this! It looks like your issue may be missing some necessary information. Can you run Thank you for your contributions. |
same here. Maybe It related to new release of |
the same happened to me but with cordova, without having made any modification to my code |
Environment: Packages: (wanted => installed) |
Is the error coming up for a specific module? In mine I had the react-native-camera library using this in its own build.gradle, (under Gradle Scripts in Android Studio)
Which was causing it to use the latest unsupported version, bringing up this issue. |
|
I suffered the same problem. It's OK last afternoon, but build error this morning.
My environment as below: |
This is what you want to look for Change that As a temporary fix of course |
There is a relevant issue you can refer to. |
I am facing the same issue
Environment: Packages: (wanted => installed) On the other hand I have a very similar project (it is basically the same one) but with react-native 0.48.4 and in that case it is working fine. |
I just fixed by adding the below line in gradle.properties googlePlayServicesVersion=11.6.0 . |
compile 'com.google.android.gms:play-services-vision:11.8.0' |
When I tried this:
I got:
And when I tried this:
I got:
|
@justcarthy Yeah, it works. |
resource found that matches the given name: attr 'android:keyboardNavigationCluster'. i got this error |
@augusto-altman You could try this one. |
In my case, I managed to solve it by aligning all version of com.google.firebase in ‘platforms/android/project.properties’ to older version such as below: cordova.system.library.4=com.google.firebase:firebase-core:11.+ The above was changed to: 11.+ from previously: + Also, any includes, e.g. (cordova-plugin-firebase/android-build.gradle) should also be changed as above. This might be temporary solution until managed to figure out what’s wrong with version 12.0.0 release. |
I fix the error changing |
It's works for me. node_modules/react-native-device-info/android/build.gradle: |
This worked for me. Edit You need to check what gms modules are required for your project. You can find required gms modules at each In my case I needed to check next 4 plugins. or, You can check the required module names by running command
|
#PlayServicesGate |
how to solve it? help help |
@ZKeLin I just got all my com.google.firebase and com.google.android deps from ...
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.firebase:firebase-crash:11.0.0'
compile 'com.google.firebase:firebase-analytics:11.0.0'
compile 'com.google.firebase:firebase-messaging:11.0.0'
compile 'com.google.android.gms:play-services-base:11.0.0'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.google.android.gms:play-services-wallet:11.0.0'
...
} and put them into allprojects {
repositories {
...
configurations.all {
// #PlayServicesGate — March, 20 2018
resolutionStrategy {
force 'com.google.firebase:firebase-core:11.0.0'
force 'com.google.firebase:firebase-crash:11.0.0'
force 'com.google.firebase:firebase-analytics:11.0.0'
force 'com.google.firebase:firebase-messaging:11.0.0'
force 'com.google.android.gms:play-services-base:11.0.0'
force 'com.google.android.gms:play-services-maps:11.0.0'
force 'com.google.android.gms:play-services-wallet:11.0.0'
}
}
}
} Use your own versions from |
I can not install ...play-services-*:11.8.0 . why? duo to my android studio is too old? |
Problem of Google Play Service: facebook/react-native#18479
Thanks @KoenvGinkel , I will stop my current react-native project for next 2 days, will resume after that. |
@mk48 follow this, this may help you, ===>>> "com.google.android.gms:play-services-vision:11.+" |
@yangguang2009 thanks, all the info have been very valuable to me I did not get I had to change the classpath until #18479 (comment) and I didn't even know you could de-synchronized the version of the gradle-wrapper with the version of the classpath (which made things quite unclear) I find your Medium blog post thorough and I'm very grateful for it. Now that I've get rid of the
I hope it'll be easier to solve ;) |
Yes, I've found it also: react-navigation/react-navigation#3097 (comment) Thanks |
@Karthikeyan-Pandian @lifesoftware cordova.system.library.2=com.google.gms:google-services:11+ After changing in project properties but still shows error Could not find any version that matches com.google.gms:google-services:11+. |
Thanks @muhammadmisbah, it solved the camera issue. Thanks :) |
After updating my gradle all seemed working fine. After updating my gradle I deleted the gradle folder in my android folder. |
@yangtaufoo After solving the error by following ur medium tutorial and my build success, but after that my app closes as soon as open... Is there any solution for this?? |
@KoenvGinkel That didn't helped me :/ |
@yangtaufoo @Vijay-clustrex same problem is happening to me. After the error has been solved, and the build is finally successful, the app crashes instantly upon opening. Any help is much appreciated. |
For those with app crashing, do a "adb logcat" in the console and start the app and look for fatal crashes, stack traces, etc. That should give you a hint. |
I had the similar issue with coming due to 1) android/app/build.gradle 2) android/build.gradle
3) CD to the android folder from shell and run the clean |
react-native-push-notification merged their gradle properties today. Firebase already supports them. |
@Vijay-clustrex @emilklindt Will need more information to be able to help. any logs is appreciated |
Using the latest version "compile 'com.google.firebase:firebase-core:12.0.1'" resolved the problem for me. |
As suggested by @nopedev, the solution for me was to force version-specific resolution of dependencies. I was experiencing problems with react-native-device-info and react-native-background-geolocation (see transistorsoft/react-native-background-geolocation#375). Below is the configuration that ended up solving it for me, which is just a slight modification of what @nopedev originally commented, adding a few more libraries:
|
This seems to be fixed after Google rolled out the patch ( |
All, Whilst forcing the GPS/GMS versions to be lower than v12 works (as suggested above) I don't think this is 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 approach I'd recommend would be to update your android project to use the latest gradle wrapper and android build tools - most projects are far behind version wise on this. Here's some instructions taken from our React Native Firebase v4 change log that should 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: |
Wait, is RN supporting the latest gradle now? I had nothing but troubles using v3. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Environment
OS: macOS Sierra 10.12.6
Node: 6.10.2
Yarn: 1.3.2
npm: 3.10.10
Watchman: 4.9.0
Xcode: Not Found
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.3 => 0.53.3
Steps to Reproduce
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: