欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

Android studio Error:Execution failed for task ':app:preDebugAndroidTestBuild'错误的解决办法

程序员文章站 2022-06-30 13:31:29
android studio新建工程后出现如下错误 error:execution failed for task ':app:predebugandroidtestbuild'....

android studio新建工程后出现如下错误

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 

解决办法:在 build.gradle 添加

android {
 ...
}

configurations.all {
 resolutionstrategy.force 'com.android.support:support-annotations:27.1.1'
}

dependencies {
 ...
}

上一篇: utf-8-BOM删除bom

下一篇: 老四最抠门