使用环境:
刚刚为了一个新的功能,打算做个demo试试,结果刚创建了一个功能就这样了。
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.
解决方法:
dependenices中加上:
dependencies {
androidTestCompile('com.android.support:support-annotations:26.1.0') {
force = true
}}
之后就运行正常了,
可是扯淡的是: 运行正常之后取消了这几行代码,项目运行也不再出错……几个意思?
有知道的朋友留言告诉下,感激不尽。
欢迎骚聊,QQ群: 88627109