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
一. Build>Rebuild Project
这种方法下次启动AS下次还是会出现同样的问题。
二.在build.gradle中添加
ps: AS里面有两个build.gradle我们在(Module:app)这个里面添加
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:27.1.1'
}
这样下次启动AS就不会出现报错 :)