1. 程式人生 > >gradle編譯出錯:Execution failed for task ':app:compileTestDebugJava'.

gradle編譯出錯:Execution failed for task ':app:compileTestDebugJava'.

STOP MAINTENANCE(本文已過時)!(2017-05-25)

今天更新了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'.

STOP MAINTENANCE(本文已過時)!(2017-05-25)今天更新了android studio,從0.5.3升級到0.6.1版本,結果在IDE中編譯時沒有問題,但是在命令列時編譯就會出現以下錯誤::app:compileTestDebugJava FAILED

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'.

標題錯誤日誌如下: Caused by: com.android.build.gradle.tasks.ResourceException: Error: Some file crunching fai

Android Studio編譯失敗org.gradle.api.tasks.TaskExecutionException: Execution failed for task '

Android Studio編譯報錯: * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':lib_umeng:verifyDebugProgua

Android Studio編譯失敗org.gradle.api.tasks.TaskExecutionException: Execution failed for task '

Android Studio編譯報錯: * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':lib_umeng:verifyDebugProg

ASError:Execution failed for task ':app:preDebugAndroidTestBuild'.

在新建AS專案時,由於gradle的版本衝突原因,經常會出現如下的錯誤 Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency

【react-native】0.57版本打包錯誤,SDK版本不匹配問題Execution failed for task 'xxx:verifyReleaseResources'

react-native版本:0.57.1 這個問題原本不是rn版本的問題,原因是0.57.1將Android SDK的版本更新到27了,這與大多第三方使用了原生程式碼的外掛不相容了,因為第三方更新不及時,SDK還是舊的版本。 先來看下錯誤日誌:  error: i

Android編譯錯誤Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'

Android編譯時報的錯誤:     Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'

Android Studio專案打包(二)常見錯誤Execution failed for task ':app:mergeReleaseResources'等等

    Generate Signed APK: Errors while building APK. You can find the errors in the 'Messages' view. 錯誤1: AAPT: libpng error: Not

AS 在編譯專案是報Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 錯誤;

在app下的build.gradle的dependencies下新增androidTestCompile('com.android.support:support-annotations:26.1.0') { force = true }其中26.1.0改成專案報錯的

org.gradle.api.tasks.TaskExecutionException: Execution failed for task 報錯,解決方案

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugManifest'.     at org.gradle.api.internal.tasks.e

編譯報錯Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with mul

gradle編譯時報錯:出現提示: Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple errors, see logs

使用Gradle 構建spring原始碼 Execution failed for task ':spring-oxm:compileTestJava'.JiBXException in JiBX

下載spring原始碼壓縮包 解壓  版本:spring-framework-3.2.6.RELEASE安裝gradle壓縮包,解壓,配置環境變數  版本:gradle-4.6修改spring原始碼包中 build.gradlerepositories屬性新增 阿里雲的倉庫

Error:Execution failed for task ':app:processDebugManifest'... android studio編譯manifest報錯

具體報錯資訊: Error:Execution failed for task ':app:processDebugManifest'.> Manifest merger failed with

Error:Execution failed for task :app:transformJackWithJackForDebug - Android

Remove jackOption from defaultConfig in build.gradle Add following lines in Application gradle dependencies { classpath 'com.android.tools.build:

Error:Execution failed for task ‘:app:clean’.

Error:Execution failed for task ‘:app:clean’. Unable to delete directory: E:\Only\android\StudioWorkPlace\YinJian\app\build\intermediates

TaskExecutionException: Execution failed for task ':app:transformJackWithJackForDebug'最權威有效的解決方案

原來  app:compileDebugJavaWithJavac 造成的原因是java jdk 8 編譯的方式和之前版本的編譯方式變了,所以程式碼裡面有語法錯誤或者類路徑錯誤會導致編譯不能通過而報出這個異常,這裡簡單講下新版和舊版的jdk的編譯方式的區別。 舊版 java

Android Error:Execution failed for task ':app:compileDebugJavaWithJavac'

這個錯誤是很模糊,根本無法定位錯誤低點,這時就需要獲得詳細的錯誤日誌來推斷錯誤 首先,可以開啟黑視窗(CMD)定位到專案目錄,或者是直接用as,開啟下面的Terminal,效果跟黑視窗一樣,而且不用手動定位到目錄 然後輸入命令 gradlew compileDebu

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

                               使用環境:        剛剛為了一個新的功能,打算做個demo試試,結果剛建立了一個功能就這樣了。 Error:Execution failed for task ':app:preDebugAndro

關於android studio 出現Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解決辦法

前段時間開啟Android studio 在build過程中總會出現以下錯誤 Error:Execution failed for task ‘:app:preDebugAndroidTestBuild’. Conflict with dependency ‘

Android 開發過程中遇到的問題Error:Execution failed for task ':app:processDebugManifest'

在開發過程中遇到了這樣一個問題: 問題1: Error:Execution failed for task ':app:processDebugManifest'.> Manifest merger failed with multiple errors, see l