Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency
2024-09-07 05:18:24
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
}
最新文章
- MyBatis3:SQL映射
- 合并excel中多个sheet
- jquery写插件
- 使用dSYM分析App崩溃日志
- Zabbix3.0 自动微信报障
- Java版本-----商店购物系统
- Win7中打开chm文件内容无法显示问题
- Linux客户/服务器程序设计范式2——并发服务器(进程池)
- 将默认首页设置成index.do的方法
- perl 当前包会覆盖父类的同名方法
- RecyclerView-------之GridView模式加载更多
- nsq源码阅读笔记之nsqd(三)——diskQueue
- 解决idea导入项目后依赖报错问题
- 当使用vue的按键修饰符不起效果的时候怎么办?如@keyup.enter = '' ;
- 浅谈java 之 Map
- Java在ServletContextListener、过滤器、拦截器解决对象无法注入问题
- SpringMVC框架04——RESTful入门
- 跨域调用报表展现页面的flash打印方法
- Rails NameError uninitialized constant class solution
- 分别给Python类和实例增加属性和方法
热门文章
- 事件时间(event time)与水印(watermark)
- 操作系统类型&;操作系统结构&;现代操作系统基本特征
- 代理模式(Proxy Pattern)C#版本的
- python_@propetry
- UVA - 12118 Inspector's Dilemma(检查员的难题)(欧拉回路)
- 每天一点点之 taro 框架开发 - 事件处理与样式表
- 大数据高可用集群环境安装与配置(09)——安装Spark高可用集群
- hdu 3388 Coprime
- JSTL 运算符汇总
- Ubuntu下运行python文件