首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法解析严格:{org.jetbrains:annotations 13.0}

无法解析严格:{org.jetbrains:annotations 13.0}
EN

Stack Overflow用户
提问于 2019-08-16 00:03:16
回答 1查看 1.6K关注 0票数 0

当我在Android项目中使用时

代码语言:javascript
复制
    androidTestImplementation "androidx.test.ext:junit:1.1.1"
    androidTestImplementation 'androidx.test:runner:1.2.0'

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

代码语言:javascript
复制
> 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' 
EN

回答 1

Stack Overflow用户

发布于 2019-08-16 00:03:16

我可以用来解决这个问题

代码语言:javascript
复制
android {
    ...

    configurations.all {
        resolutionStrategy {
            // Please removed it, as soon as the project compiles without it
            force 'org.jetbrains:annotations:13.0'
        }
    }
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57512625

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档