gradle编译出错:Execution failed for task ':app:compileTestDebugJava'.
今天更新了android studio,从0.5.3升级到0.6.1版本,结果在IDE中编译时没有问题,但是在命令行时编译就会出现以下错误:
:app:compileTestDebugJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileTestDebugJava'. > No signature of method: com.android.build.gradle.AppPlugin.getRuntimeJarList() is applicable for argument types: () values: []
我随着更新gradle到1.12,问题同样存在。
貌似是gradle更新之后,里面的单元测试插件未更新。各种谷歌,找到了这个地址:https://github.com/robolectric/robolectric-gradle-plugin。于是换用原来的插件为这一个,修改如下(参照该项目的README):将以下内容:
dependencies {
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'
}
修改为:
dependencies {
classpath 'org.robolectric:robolectric-gradle-plugin:0.11.+'
}
同时把apply plugin: 'android-test' 修改为apply plugin: 'robolectric'
再运行Gradle clean build,成功。
gradle编译出错:Execution failed for task ':app:compileTestDebugJava'.的更多相关文章
- 打包APK出现org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:lintVitalRelease'.
AndroidS Studio打包APK时出现问题:org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':a ...
- Android中使用databinding编译时出现的error:Execution failed for task ':app:dataBindingProcessLayoutsDebug'
Windows环境下使用svn对AndroidStudio更新代码时,总会在源文件中出现一堆乱码,尤其是xml文件中的乱码,不仅找起来费劲,改起来更费劲. 最近从svn更新代码之后,编译时出现了下面这 ...
- Android Studio 编译错误 Error:Execution failed for task ':app:buildInfoDebugLoader'.
今天来到打开昨天的项目运行正常,然后改动了一点代码编译报错: Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exc ...
- Android:Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
今天开发Android项目时,导入了http有关架包后,程序编译报错如下: Error:Execution failed for task ':app:transformResourcesWithMe ...
- 我的Android进阶之旅------>解决:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
错误描述 今天在Android Studio项目中加入了jackson的开发包,编译运行时候,引发了如下的错误: Error:Execution failed for task ':app:trans ...
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
使用android studio 时,编译成功但用build apk时却报错 环境: android studio 1.5, jdk1.7 错误:Error:Execution failed for ...
- Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException
异常Log: Error:Execution failed for task ‘:app:dexDebug’. > com.android.ide.common.process.ProcessE ...
- 关于android studio 出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解决办法
Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 2018年 ...
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.Exec
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.> com.android.build.api.tr ...
随机推荐
- 基于Spark环境对比Python和Scala语言利弊
在数据挖掘中,Python和Scala语言都是极受欢迎的,本文总结两种语言在Spark环境各自特点. 本文翻译自 https://www.dezyre.com/article/Scala-vs-Py ...
- java的迭代器详解
迭代器的引出 在jdk1.5版本之前是没有 foreach的,然而1.5版本就加上了foreach,而引入的新的foreach功能并不是在jvm上进行改进的因为代价太高,甲骨文工程师想到了一个比较好的 ...
- Vue2学习(3)
子组件索引 尽管有 props 和 events,但是有时仍然需要在 JavaScript 中直接访问子组件.为此可以使用 ref 为子组件指定一个索引 ID.例如: <div id=" ...
- [坑]Spring利用注解@Value获取properties属性为null
今天在项目中想使用@Value来获取Springboot中properties中属性值. 场景:定义了一个工具类,想要获取一些配置参数,使用了@value来获取,但是死活也获取不到. 如何解决:在使用 ...
- JAVA (集合和数据结构)
Collection和Collections的区别: 1.java.util.Collection 是一个集合接口.它提供了对集合对象进行基本操作的通用接口方法.Collection接口在Java 类 ...
- 安装redis 执行make命令时报错解决方法
一.未安装GCC 解决方法:执行yum install gcc-c++命令安装GCC,完成后再次执行make命令 yum install gcc-c++ Linux无法连接网络 http://www. ...
- 前端性能优化之-dns预解析
预解析的实现: 1. 用meta信息来告知浏览器, 当前页面要做DNS预解析:<meta http-equiv="x-dns-prefetch-control" conten ...
- public、protected、default、private区别
public.protected.default.private: 修饰符 本类 同包 子类 其他 public √ √ √ √ protected √ √ √ × default √ √ × × p ...
- Ubuntu 下安装 matlab2018a
如果存在依赖关系无法安装,可以尝试命令:sudo apt --fix-broken install 不指明软件包而解决此问题. 参考资料:Ubuntu 16.04LTS 安装 MATLAB 2014B ...
- Java 零散笔记
运算符: 整数被0除将会产生一个异常,而浮点数被0除会得到无穷大或NaN结果. 二元运算符: 如果运算符得到一个值,其类型与左侧操作数的类型不用,就会发生强制类型转换. int x = 0; x += ...