I am working on a react-native
app that uses react-native-firebase. I've setup a CI build on travis with the aim to have reproducible builds, and it has suddenly stopped working, as detailed here:
- before: 4 days ago, the build works
- after: today, the exact same build is broken, failing with the following message:
Android dependency 'com.google.android.gms:play-services-base' has different version for the compile (16.0.1) and runtime (17.0.0) classpath. You should manually set the same version via DependencyResolution
My only reasonable guess is that some dependency has changed, but I don't understand android builds well enough to figure out what has happened or why.
And obviously, how do I prevent such surprises from happening in the future? (in my mind, this build should be perfectly repeatable)
As a side note, when the build fails, it also shows several warnings like:
WARNING: Conflict with dependency 'com.google.android.gms:play-services-base' in project ':app'. Resolved versions for runtime classpath (17.0.0) and compile classpath (16.0.1) differ. This can lead to runtime crashes. To resolve this issue follow advice at https://developer.android.com/studio/build/gradle-tips#configure-project-wide-properties. Alternatively, you can try to fix the problem by adding this snippet to /home/travis/build/mapswipe/mapswipe/android/app/build.gradle:
dependencies {
implementation("com.google.android.gms:play-services-base:17.0.0")
}
but following that advice only causes further (different) errors.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…