在用AndroidStudio3.0.1 新建项目的时候出现了一个bug:
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.
然后找到了解决办法如下:
在app下的build.gradle文件中 添加
android{
`````
configurations.all { resolutionStrategy.force 'com.android.support:support-annotations:27.1.1' }
`````
}
最后重新编译,就好了。