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.

  

解决方法

1.修改app version

apply plugin: 'com.android.application'

android {
compileSdkVersion 26//
defaultConfig {
applicationId "com.example.yueli.flightcheck"
minSdkVersion 14
targetSdkVersion 26//
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
} dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'//:27.1.1
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

2.修改app test version

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.yueli.flightcheck"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
} dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'//1.0.1
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'//3.0.1
}

最新文章

  1. MyBatis3:SQL映射
  2. 合并excel中多个sheet
  3. jquery写插件
  4. 使用dSYM分析App崩溃日志
  5. Zabbix3.0 自动微信报障
  6. Java版本-----商店购物系统
  7. Win7中打开chm文件内容无法显示问题
  8. Linux客户/服务器程序设计范式2——并发服务器(进程池)
  9. 将默认首页设置成index.do的方法
  10. perl 当前包会覆盖父类的同名方法
  11. RecyclerView-------之GridView模式加载更多
  12. nsq源码阅读笔记之nsqd(三)——diskQueue
  13. 解决idea导入项目后依赖报错问题
  14. 当使用vue的按键修饰符不起效果的时候怎么办?如@keyup.enter = '' ;
  15. 浅谈java 之 Map
  16. Java在ServletContextListener、过滤器、拦截器解决对象无法注入问题
  17. SpringMVC框架04——RESTful入门
  18. 跨域调用报表展现页面的flash打印方法
  19. Rails NameError uninitialized constant class solution
  20. 分别给Python类和实例增加属性和方法

热门文章

  1. 事件时间(event time)与水印(watermark)
  2. 操作系统类型&操作系统结构&现代操作系统基本特征
  3. 代理模式(Proxy Pattern)C#版本的
  4. python_@propetry
  5. UVA - 12118 Inspector's Dilemma(检查员的难题)(欧拉回路)
  6. 每天一点点之 taro 框架开发 - 事件处理与样式表
  7. 大数据高可用集群环境安装与配置(09)——安装Spark高可用集群
  8. hdu 3388 Coprime
  9. JSTL 运算符汇总
  10. Ubuntu下运行python文件