android开发错误集

在开发过程中总会遇到很多奇葩问题,于是把他收集起来,避免下次在遇到的时候一脸懵逼!

问题一:

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中的compileSdkVersion,产生所依赖的dependency与当前版本不一致导致的。(参考文章:https://blog.csdn.net/xiajun2356033/article/details/79260249),但当时我是新建项目报的错。

解决方法:

build->Rebuid-project

不管怎样,重构项目,问题解决。

猜你喜欢

转载自blog.csdn.net/youngmy5/article/details/80528215