Android P 构建项目时出现的一个小bug

出现的问题

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.gradle中将

implementation 'com.android.support:appcompat-v7:26.1.0'

androidTestImplementation 'com.android.support:support-annotations:26.1.0'

修改为:

implementation 'com.android.support:appcompat-v7:27.1.1'

androidTestImplementation 'com.android.support:support-annotations:27.1.1'

猜你喜欢

转载自www.cnblogs.com/jooy/p/8949481.html
今日推荐