ubu*_*oob 18 android build.gradle
这是完整的错误 -
Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.
Run Code Online (Sandbox Code Playgroud)
我知道这类答案有很多解决方案,但我是android studio的绝对初学者,我无法理解那些解决方案,比如命令行界面与gradle交互等等......
如果有的话,我一直在寻找这个问题的简单解决方案.非常感谢!
Kop*_*ant 25
更改构建gradle app中的所有实现.例如.
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-annotations:27.1.1'
Run Code Online (Sandbox Code Playgroud)
将其全部更改为最新版本(27.1.1)并同步项目.
zon*_*nda 10
configurations.all{
resolutionStrategy {
force 'com.android.support:support-annotations:26.1.0'
}
}
Run Code Online (Sandbox Code Playgroud)
在gradle文件中修改以下行.
//From
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//To
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
19439 次 |
| 最近记录: |