Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.and
程序员文章站
2022-07-13 11:03:00
...
AS 3.0 新建项目报错:
错误:
Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (25.4.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.
原build.gradle
大家看下面的那个错误:Resolved versions for app (25.4.0) and test app (27.1.1) differ,这是版本冲突的问题。
我用的是25版本,所以提示我使用25.4.0,
compileSdkVersion 25
于是我在app下的build.gradle文件中的dependences {}中添加如下代码:
androidTestCompile('com.android.support:support-annotations:25.4.0') {
force = true
}
下面是解决问题之后的代码:
解决了。
因为大家使用的compileSdkVersion版本不同,所以根据它提示的版本来加就可以了。
上一篇: 【考研每日一题34】全排列(C++)
下一篇: Web前端杂记
推荐阅读
-
Execution failed for task ':app:preDebugAndroidTestBuild问题解决
-
ANDROID打包错误ERROR:EXECUTION FAILED FOR TASK ′:APP:LINTVITALRELEASE′.
-
关于android studio打开后自动弹出:Error:Execution failed for task ':app:preDebugAndroidTestBuild'
-
Error:Execution failed for task ':app:processDebugManifest'.
-
异常Error:Execution failed for task ':app:preDebugAndroidTestBuild'解决方法
-
Error:Execution failed for task ':app:kaptDebugKotlin'
-
Error:Execution failed for task ':get_local_video:preDebugAndroidTestBuild'.
-
Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.and
-
Android Studio Error:Execution failed for task ':app:preDebugAndroidTestBuild'.彻底解决的方法以及修改AScompileSDKVersion
-
Android:Error:Execution failed for task ':app:clean'. > Unable to del