Cannot Find A Version Of 'com.android.support:support-annotations' That Satisfies The Version Constraints
When i want to generate a signed APK (release) using Proguard rules i got this error message : Cannot find a version of 'com.android.support:support-annotations' that satisfies
Solution 1:
The problem is solved! I needed to add
implementation 'com.android.support:support-annotations:28.0.0'
under
dependencies in android/app/build.gradle
in my library. The message warning was enough explicit to do that, but I didn't think about modifying the library dependencies.
Solution 2:
What worked for me was adding a configuration to resolve this conflict by forcing the system to use the specified dependency path despite having many other options.
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor(0, 'seconds')
cacheChangingModulesFor(0, 'seconds')
force('com.android.support:support-annotations:26.1.0')
}
transitive = true
}
Solution 3:
I had a similar error message and resolved it by removing this line:
androidTestImplementation 'androidx.annotation:annotation:1.1.0'
Solution 4:
Try adding
repositories {
maven { url 'https://maven.google.com' }
}
in your project level gradle.
Post a Comment for "Cannot Find A Version Of 'com.android.support:support-annotations' That Satisfies The Version Constraints"