Cannot find a version of 'com.android.support:support-annotations' that satisfies the version constraints

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.


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
}