AS 开发中遇到的所有问题

1.运行AS编译器,发生如下错误

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.0) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.

发生这类型的错误,是当我们修改了.build中的compileSdkVersion,产生所依赖的dependency与当前版本不一致导致的。
解决方法:build->Rebuid-project

猜你喜欢

转载自blog.csdn.net/m0_37711172/article/details/80414714