【问题标题】:Could not resolve org.jetbrains:annotations:{strictly 13.0}无法解析 org.jetbrains:annotations:{strictly 13.0}
【发布时间】:2019-08-15 16:03:15
【问题描述】:

当我在我的 Android 项目中使用时

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

为了减少弃用警告,我遇到了

> 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' 

【问题讨论】:

    标签: android android-espresso androidx


    【解决方案1】:

    我能够解决它

    android {
        ...
    
        configurations.all {
            resolutionStrategy {
                // Please removed it, as soon as the project compiles without it
                force 'org.jetbrains:annotations:13.0'
            }
        }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-14
      • 2023-02-04
      相关资源
      最近更新 更多