今天更新了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'.的更多相关文章

  1. gradle编译出错:Execution failed for task ':app:compileTestDebugJava'.

    今天更新了android studio,从0.5.3升级到0.6.1版本,结果在IDE中编译时没有问题,但是在命令行时编译就会出现以下错误: :app:compileTestDebugJava FAI ...

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

  3. Android中使用databinding编译时出现的error:Execution failed for task ':app:dataBindingProcessLayoutsDebug'

    Windows环境下使用svn对AndroidStudio更新代码时,总会在源文件中出现一堆乱码,尤其是xml文件中的乱码,不仅找起来费劲,改起来更费劲. 最近从svn更新代码之后,编译时出现了下面这 ...

  4. Android Studio 编译错误 Error:Execution failed for task ':app:buildInfoDebugLoader'.

    今天来到打开昨天的项目运行正常,然后改动了一点代码编译报错: Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exc ...

  5. Android:Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

    今天开发Android项目时,导入了http有关架包后,程序编译报错如下: Error:Execution failed for task ':app:transformResourcesWithMe ...

  6. 我的Android进阶之旅------>解决:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

    错误描述 今天在Android Studio项目中加入了jackson的开发包,编译运行时候,引发了如下的错误: Error:Execution failed for task ':app:trans ...

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

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

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

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

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

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

随机推荐

  1. sublime text 2 配置文件

    安装好 sublime text 2后不进行任何设置,如果允许 sublime text 2 软件的话,会在以下目录自动生成一个 sublime text 2 的文件夹,这个文件夹是用来放配置文件的, ...

  2. [原]Unity3D深入浅出 - 雾效(Fog)

    在Unity中开启雾效的方式:依次选中菜单栏中的 Edit - Render Settings 项,勾选Fog 选框即可开启雾效.雾效的参数如下: Fog Color:雾的颜色. Fog Mode:雾 ...

  3. unity3d游戏物体跟着鼠标方向移动

    效果:当点击鼠标左键时,游戏对象会朝鼠标点击的方向移动,类似魔兽争霸一样. 思路:把鼠标的坐标转化成世界坐标(鼠标默认是屏幕坐标),然后当点击鼠标时,物体将朝着鼠标的世界坐标方向移动. 如果你看到这的 ...

  4. POJ (线段相交 最短路) The Doors

    题意: 一个正方形中有n道竖直的墙,每道墙上开两个门.求从左边中点走到右边中点的最短距离. 分析: 以起点终点和每个门的两个端点建图,如果两个点可以直接相连(即不会被墙挡住),则权值为两点间的欧几里得 ...

  5. python扩展实现方法--python与c混和编程

    前言 需要扩展Python语言的理由: 创建Python扩展的步骤 1. 创建应用程序代码 2. 利用样板来包装代码 a. 包含python的头文件 b. 为每个模块的每一个函数增加一个型如PyObj ...

  6. jQuery.Validate验证库

    一.用前必备官方网站:http://bassistance.de/jquery-plugins/jquery-plugin-validation/ API: http://jquery.bassist ...

  7. 数学(扩展欧几里得算法):HDU 5114 Collision

    Matt is playing a naive computer game with his deeply loved pure girl. The playground is a rectangle ...

  8. 转载crontab例行工作调度

    转自:http://blog.sina.com.cn/s/blog_95ee143401017y70.html crontab [-e [UserName]|-l [UserName]|-r [Use ...

  9. 求一字符串最长不重复字符子串的长度【Java 版】

    一. 前言 最近学习有点断断续续,整理的一些知识点要么不完整,要么完全没搞懂,不好拿上台面,还是先在草稿箱躺着吧.偶尔在浏览大牛博客http://coolshell.cn的时候,发现大牛业余时间也在做 ...

  10. iOS7适配之设计篇

    (注:文章简要翻译自 Apple <iOS 7 UI Transition Guide>,由于该文档为开发者预览版,并非最终文档,所以 iOS7 正式上线可能有部分不同) 准备工作 iOS ...