Android dependency 'com.google.android.gms:play-services-stats' has different version for the compile (16.0.1) and runtime (17.0.0) classpath
This comment on github provides the answer to your question (and mine):
A dependency (react-native-device-info
in this case) was using the latest version of one of its dependencies instead of a fixed/pinned version. When a new version of google services was released yesterday, it caused the build to pull in the new version for device-info
, thereby causing the conflict with other dependencies that correctly pin the version they need.
The solution is to do what is explained in the linked post in your android/app/build.gradle
:
implementation(project(":react-native-device-info"), {
exclude group: "com.google.android.gms"
})
implementation "com.google.android.gms:play-services-gcm:16.0.0"
and possibly replace react-native-device-info
with any other dependency that may have the same problem (they would include a line like implementation "com.google.android.gms:play-services-gcm:+"
which depends on whatever is the latest version of google gcm).
Add in the file: android/app/build.gradle
android {
...
dependencies {
implementation 'com.google.android.gms:play-services-maps:17.0.0'
}