play-services-plugins
play-services-plugins copied to clipboard
Non-actionable error message from strict version check
Describe the bug After updating to 'com.google.gms:google-services:4.2.0' we get the following error message
In project 'redacted-app' a resolved Google Play services library dependency depends on another at an exact versi
on (e.g. "[1.3.1,2.3]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.nimbusds:nimbus-jose-jwt:5.1 -> net.minidev:json-smart@[1.3.1,2.3], but json-smart version was 2
.3.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'redacted' depends on project 'app' which depends onto com.redacted:[email protected]
-- Project 'redacted' depends on project 'app' which depends onto com.redacted:[email protected]
8.254
This error message does not contain enough information to fix the dependency conflict. We don't know which Google Play Services library that has a conflict and more importantly we do not know which version json-smart
it depends on.
Workaround available by disabling the strict version check.
To Reproduce Complete steps to reproduce the behavior are unknown, and that's the problem.
Expected behavior The plugin should produce an error message with a reference to which Google Service Library has the conflict and what version it depends on.
Desktop (please complete the following information):
- Gradle version: 4.6
- Android Studio version 3.2.1 (stable)
- Plugin name and version: google-services 4.2.0
Additional context The same dependency conflict are discussed here: https://github.com/Microsoft/react-native-code-push/issues/1448 https://github.com/invertase/react-native-firebase/issues/1676
This problem looks like it's a bug in https://github.com/google/play-services-plugins/blob/master/strict-version-matcher-plugin/src/main/java/com/google/android/gms/dependencies/VersionEvaluation.kt#L17, and not a problem with the error message. My apologies, I should have studied the code first before filing.
Thanks for the bug report @bjoern-isaksson. As far as I know, no Google Play services component depends onto json-smart, but it is possible the plugin is evaluating non-GPs dependencies for the same issues. Will look into it.
Hi @zhiqiao any update on this issue ? I must use version 4.2.0, because there are runtime error on AGP 3.3 with google plugin 4.1.0. It only solve by upgrading to 4.2.0, however i am in stuck with this issue after upgrading. Should I disable strict version matcher or there will be ETA for this issue to be fixed ? Thanks
No update so far, I'll chase up internally.
Also running into this issue. Can we force a dependency as a workaround? Haven't been able to get it to work.
Solution:
@matthewrkula try this: https://github.com/Microsoft/react-native-code-push/issues/1448#issuecomment-487270749
I was using GoogleServicesPlugin.config.disableVersionCheck = true
to workaround this. Unfortunately, GoogleServicesPlugin.config
is no longer a static public variable on com.google.gms:google-services:4.3.0
and issue is still there. How would one work around this?
4.3.0 seems to require a different approach - this works for me in my app build.gradle file:
apply plugin: 'com.google.gms.google-services'
googleServices {
disableVersionCheck = true
}
Thanks. How did you discover they this method?
On July 24, 2019 10:48:59 AM UTC, Daniel Carter [email protected] wrote:
4.3.0 seems to require a different approach - this works for me in my app build.gradle file:
apply plugin: 'com.google.gms.google-services'
googleServices { disableVersionCheck = true }
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/google/play-services-plugins/issues/30?email_source=notifications&email_token=ADLIVVZ6DWRDSWG25GGIHULQBAXRXA5CNFSM4GJOBCPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2V6OMI#issuecomment-514582321, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADLIVV46KMUQXWMGLHP2KTTQBAXRXANCNFSM4GJOBCPA.
https://developers.google.com/android/guides/releases#november_11_2019 (https://developers.google.com/android/guides/google-services-plugin version 4.3.3 and https://developers.google.com/android/guides/versioning#standalone_version_matcher_plugin version 1.2.1) updated the plugin to only check compatible versions of Google Play services and Firebase libraries