The firebase-common dependency exposes auto-value-annotations via its api configuration. This leads to build failures when the consuming project includes a dependency on a different version of auto-value-annotations.
For example:
* What went wrong:
Could not determine the dependencies of task ':Mobile-Android:preDevDebugBuild'.
> Could not resolve all task dependencies for configuration ':Mobile-Android:devDebugCompileClasspath'.
> Could not resolve com.google.auto.value:auto-value-annotations:1.6.3.
Required by:
project :Mobile-Android
> Cannot find a version of 'com.google.auto.value:auto-value-annotations' that satisfies the version constraints:
Dependency path ':Mobile-Android:unspecified' --> 'com.google.auto.value:auto-value-annotations:1.6.3'
Constraint path ':Mobile-Android:unspecified' --> 'com.google.auto.value:auto-value-annotations:{strictly 1.6}' because of the following reason: devDebugRuntimeClasspath uses version 1.6
Dependency path ':Mobile-Android:unspecified' --> 'com.google.firebase:firebase-messaging:17.5.0' --> 'com.google.firebase:firebase-common:16.1.0' --> 'com.google.auto.value:auto-value-annotations:1.6'
> Could not resolve com.google.auto.value:auto-value-annotations:{strictly 1.6}.
Required by:
project :Mobile-Android
> Cannot find a version of 'com.google.auto.value:auto-value-annotations' that satisfies the version constraints:
Dependency path ':Mobile-Android:unspecified' --> 'com.google.auto.value:auto-value-annotations:1.6.3'
Constraint path ':Mobile-Android:unspecified' --> 'com.google.auto.value:auto-value-annotations:{strictly 1.6}' because of the following reason: devDebugRuntimeClasspath uses version 1.6
Dependency path ':Mobile-Android:unspecified' --> 'com.google.firebase:firebase-messaging:17.5.0' --> 'com.google.firebase:firebase-common:16.1.0' --> 'com.google.auto.value:auto-value-annotations:1.6'
> Could not resolve com.google.auto.value:auto-value-annotations:1.6.
Required by:
project :Mobile-Android > com.google.firebase:firebase-common:16.1.0
> Cannot find a version of 'com.google.auto.value:auto-value-annotations' that satisfies the version constraints:
Dependency path ':Mobile-Android:unspecified' --> 'com.google.auto.value:auto-value-annotations:1.6.3'
Constraint path ':Mobile-Android:unspecified' --> 'com.google.auto.value:auto-value-annotations:{strictly 1.6}' because of the following reason: devDebugRuntimeClasspath uses version 1.6
Dependency path ':Mobile-Android:unspecified' --> 'com.google.firebase:firebase-messaging:17.5.0' --> 'com.google.firebase:firebase-common:16.1.0' --> 'com.google.auto.value:auto-value-annotations:1.6'
I found a few problems with this issue:
As a hotfix you can force the dependency:
allprojects {
configurations.all {
resolutionStrategy {
force("com.google.auto.value:auto-value-annotations:1.6.3")
}
}
}
Yep, that's exactly what we're doing.
/assign @vkryachko
Note that another possible workaround (at least on my project) was to just start including my own auto-value-annotations as api as well.
As a hotfix you can force the dependency:
allprojects { configurations.all { resolutionStrategy { force("com.google.auto.value:auto-value-annotations:1.6.3") } } }
hi i must to put this where?
As a hotfix you can force the dependency:
allprojects {
configurations.all {
resolutionStrategy {
force("com.google.auto.value:auto-value-annotations:1.6.3")
}
}
}hi i must to put this where?
In _android/build.gradle_
As a hotfix you can force the dependency:
allprojects { configurations.all { resolutionStrategy { force("com.google.auto.value:auto-value-annotations:1.6.3") } } }
it doesn't work fo me
Most helpful comment
As a hotfix you can force the dependency: