android studio新建项目时出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
android studio更新后创建新项目时出现以下错误

可以用Build->Rebuild Project解决,但这个方法只是临时的,重新打开项目还是会报错
所以用另一种方法:
在app下的build.gradle文件中的dependences {}中添加如下代码:
androidTestCompile('com.android.support:support-annotations:26.1.0') {
force = true
}
添加后截图:

参考自https://blog.csdn.net/fighting_2017/article/details/80244982
android studio新建项目时出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'.的更多相关文章
- Android Studio Error:Execution failed for task ':app:preDebugAndroidTestBuild'.彻底解决的方法以及修改AScompileSDKVersion
Error Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency ...
- 关于android studio 出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解决办法
Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 2018年 ...
- Android Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency
错误内容: Error:Execution failed for task ':app:preDebugAndroidTestBuild'.> Conflict with dependency ...
- 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 ...
- Error:Execution failed for task ':app:preDebugAndroidTestBuild'.错误解决
在新建布局文件的时候,页面显示: design editor is unavailable until a successful build(设计编辑器不可用,直到成功创建.) 细看下面还有一行错误: ...
- Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency
Error : Execution failed for task ’ :app: preDebugAndroidTestBuild’.Conflict with dependency ‘com.an ...
- 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 ...
- Error:Execution failed for task ':app:clean'.
运行时出现 Error:Execution failed for task ':app:clean'. 错误,Builld->Clean Project即可.
- Android Studio 编译错误 Error:Execution failed for task ':app:buildInfoDebugLoader'.
今天来到打开昨天的项目运行正常,然后改动了一点代码编译报错: Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exc ...
随机推荐
- JSP中使用JSTL表达式
最近写web项目,为了使JSP代码美观好维护,决定采用EL&JSTL表达式. EL表达式直接就可以用,但是JSTL表达式是属于apache的一个开源库,这个用起来就需要倒入一些jar包之 ...
- Angular Material 按钮图标系列
工做中经常用到Angular Material 中的好多按钮素材,奈何官网经常上不去,所以只能自己把这些常用的按钮扒下来了,留给自己同时也留给大家方便查看. Angular material mat- ...
- 小程序中实时将less编译成wxss
1.npm或者yarn全局安装wxss-cli npm install -g wxss-cli 2.运行wxss-cli命令(weuiTest为小程序目录) wxss ./weuiTest 实时监听w ...
- 认识CSS中标题引入icon图标
前端之HTML,CSS(十一) icon图标 icon图标的使用 获取网站的中标题icon图标,以京东为例:在域名后添加/favicon.ico Enter打开 鼠标右键,图标另存为下载icon图标, ...
- 修改docker的port端口映射
原以为修改docker的端口映射只是一条命令就可以搞定,结果发现没那么简单,记录一下以防忘记.1. 查看需要修改的容器,记住container iddocker ps -a2. 停止容器docker ...
- ubuntu 16.04通过源码方式安装nginx
1.下载nginx源码包 wget http://nginx.org/download/nginx-1.11.12.tar.gz 2.解压该tar包 tar zxvf nginx-1.11.12.t ...
- IDEA里如何多种方式打jar包,然后上传到集群
关于IDEA里如何多种方式打jar包,然后上传到集群的问题? 前期准备,就是在,IDEA里,maven来创建项目.这里不多赘述. 1)用maven项目来打包,我推荐这个. (强烈推荐,简单又快速) S ...
- SecureCRTPortable的安装和使用(图文详解)
不多说,直接上干货! 玩玩这个远程连接软件,是个绿色软件. 别人已经做好了的. 解压之后, 下面,软件展示下, 这会默认去打开, 为了,方便,使用,放到桌面,作为快捷方式 成功 欢迎大家,加入我的微信 ...
- ftp&nginx搭建图片服务器
下面使用ftp+nginx搭建一个简单的服务器 ftp用于文件的传输 nginx提供http服务 nginx服务器的安装和配置可以参照之前的教程:nginx安装及其配置详细教程 下面介绍ftp服务的安 ...
- Can't find the 'libpq-fe.h header when trying to install pg gem
https://stackoverflow.com/questions/6040583/cant-find-the-libpq-fe-h-header-when-trying-to-install-p ...