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
}

Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency的更多相关文章

  1. Android Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency

    错误内容: Error:Execution failed for task ':app:preDebugAndroidTestBuild'.> Conflict with dependency ...

  2. 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

    出现的问题: Error:Execution failed for task ':app:preDebugAndroidTestBuild'.> Conflict with dependency ...

  3. AS报错:Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.and

    build->Rebuid-project 寻找错误根源: 报错里可以发现: Resolved versions for app (26.1.0) and test app (27.1.1) d ...

  4. Android Studio Error:Execution failed for task ':app:preDebugAndroidTestBuild'.彻底解决的方法以及修改AScompileSDKVersion

    Error Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency ...

  5. 关于android studio 出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解决办法

    Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 2018年 ...

  6. Error:Execution failed for task ':app:preDebugAndroidTestBuild'.错误解决

    在新建布局文件的时候,页面显示: design editor is unavailable until a successful build(设计编辑器不可用,直到成功创建.) 细看下面还有一行错误: ...

  7. android studio新建项目时出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'.

    android studio更新后创建新项目时出现以下错误 可以用Build->Rebuild Project解决,但这个方法只是临时的,重新打开项目还是会报错 所以用另一种方法: 在app下的 ...

  8. Error:Execution failed for task ':app:clean'.

    运行时出现 Error:Execution failed for task ':app:clean'. 错误,Builld->Clean Project即可.

  9. Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

    使用android studio 时,编译成功但用build apk时却报错 环境: android studio 1.5, jdk1.7 错误:Error:Execution failed for ...

随机推荐

  1. oracle 使用触发器实现id自增

    前提:存在数据库di_test,主键为id.1.创建一个索引sequence create sequence di_test_id minvalue 1 nomaxvalue start with 1 ...

  2. Docker 搭建开源跳板机_jumpserver (运维开源堡垒机_jumpserver) Centos_7.0

    最近看到一个开源项目(jumpserver)  很不错  还是用Docker  部署得 ... 抽了点时间拿来学习一下  部署    分析   简单使用一下  ....好了先搭起来 准备 工作:    ...

  3. 欧拉回路--P2731 骑马修栅栏 Riding the Fences

    实在懒得复制题干了 *传送 1.定义 *如果图G(有向图或者无向图)中所有边一次仅且一次行遍所有顶点的通路称作欧拉通路. *如果图G中所有边一次仅且一次行遍所有顶点的回路称作欧拉回路. *具有欧拉回路 ...

  4. POJ-3262 贪心的一个小技巧

    Protecting the Flowers Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 3204   Accepted: ...

  5. 【Tensorflow】(tf.Graph)和(tf.session)

    图(tf.Graph):计算图,主要用于构建网络,本身不进行任何实际的计算. 会话(tf.session):会话,主要用于执行网络.所有关于神经网络的计算都在这里进行,它执行的依据是计算图或者计算图的 ...

  6. 2020PHP面试-Redis篇

    一.Redis 数据类型 1. string 字符型. 2.hash hash  结构化的对象.  key不可重复 3.list 队列  lpush rpop  lpop rpush 4. set 集 ...

  7. 一天一个设计模式——Strategy策略模式

    一.模式说明 策略模式比较好理解,就是将程序中用到的算法整体的拿出来,并有多个不同版本的算法实现,在程序运行阶段,动态的决定使用哪个算法来解决问题. 举个实际的例子:排序算法的问题,假如我们的程序中需 ...

  8. python3 sort list

    1. 对元素指定的某一部分进行排序,关键字排序 s = ['release.10.txt','release.1.txt','release.2.txt','release.14.txt','rele ...

  9. 每天一点点之vue框架开发 - vue坑-This relative module was not found

    94% asset optimization ERROR Failed to compile with 1 errors This relative module was not found: * . ...

  10. MFC下的网络编程(1)CAsyncSocket进行无连接(UDP)通信

    服务器端发送数据给客户端 先看服务器端: CAsyncSocket m_sockSend;                       //声明一个Socket对象 点击发送数据后,执行下面这些动作 ...