0

When I use in my Android project

    androidTestImplementation "androidx.test.ext:junit:1.1.1"
    androidTestImplementation 'androidx.test:runner:1.2.0'

to reduce deprecation warnings, I run into

> Could not resolve all files for configuration ':sample:debugAndroidTestRuntimeClasspath'.
   > Could not resolve org.jetbrains:annotations:{strictly 13.0}.
     Required by:
         project :sample
      > Cannot find a version of 'org.jetbrains:annotations' that satisfies the version constraints: 
           Dependency path 'Moka:sample:unspecified' --> 'Moka:moka:unspecified' --> 'com.jakewharton.timber:timber:4.7.1' --> 'org.jetbrains:annotations:16.0.1'
           Constraint path 'Moka:sample:unspecified' --> 'org.jetbrains:annotations:{strictly 13.0}' because of the following reason: debugRuntimeClasspath uses version 13.0
           Dependency path 'Moka:sample:unspecified' --> 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41' --> 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41' --> 'org.jetbrains:annotations:13.0' 
hannes ach
  • 16,247
  • 7
  • 61
  • 84

1 Answers1

1

I was able to solve it with

android {
    ...

    configurations.all {
        resolutionStrategy {
            // Please removed it, as soon as the project compiles without it
            force 'org.jetbrains:annotations:13.0'
        }
    }
}
hannes ach
  • 16,247
  • 7
  • 61
  • 84