問題:
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.
studio 3.0 新建項(xiàng)目 默認(rèn) build.gradle(project :)
出現(xiàn)以上問題 直接看是看不出來的 在重新編譯后就會(huì)報(bào)出出以上錯(cuò)誤
解決方法:
在 dependencies{} 中添加 下面的代碼
androidTestCompile('com.android.support:support-annotations:26.1.0') {
force =true
}
如圖 ?重新編譯就可以了