当我在Android Studio中启动一个新项目时,它会给出这样的错误消息
错误:任务“: app: preDebugAndreidTestBuild”执行失败。
与项目:app中的依赖项com.android.support:支持-注释冲突。app(26.1.0)和test app(27.1.1)的解决版本不同。有关详细信息,请参见https://d.android.com/r/tools/test-apk-dependency-conflicts.html。
我在你的build.gradle
更改中遇到了同样的问题
dependencies
{
...
implementation 'com.android.support:appcompat-v7:26.1.0'
...
}
到…里面
dependencies {
...
implementation 'com.android.support:appcompat-v7:27.1.1'
...
}
然后呢?
andriod{
compileSdkVersion 26 **into compileSdkVersion 27
...**
defaultConfig{
...
targetSdkVersion 26 >> **targetSdkVersion 27**
}