簡體   English   中英

任務':hVFhirApp:dexDebug'的執行失敗。 > com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:

[英]Execution failed for task ':hVFhirApp:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:

我知道這是以前在一個問題中曾提出過的錯誤,但我還沒有找到適合我的答案。

這是我的gradle文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"


    defaultConfig {
        applicationId "com.example.hvfhirapp"
        minSdkVersion 16
        targetSdkVersion 21

        multiDexEnabled = true

    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

configurations{
    compile.exclude module: 'commons-codec'
    compile.exclude module: 'javax.json'

}

dependencies {
    compile project(':androidsdksimplexml')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'ca.uhn.hapi.fhir:hapi-fhir-base:1.1'
    compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:1.1'
    compile 'com.android.support:multidex:1.0.1'
}

android {
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
}

如您所見,我已經輸入了multiDexEnabled = true,並且還在清單應用程序中添加了MultiDex +的依賴項。

另外我在gradle控制台中的堆棧跟蹤中的確切錯誤是:

* What went wrong:
Execution failed for task ':hVFhirApp:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 1

我還要添加的事實是,當我刪除依賴項括號中的排除項時,顯示的錯誤是

* What went wrong:
Execution failed for task ':hVFhirApp:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: org/apache/commons/codec/binary/Base64.class

這就是為什么我排除他們

任何幫助將不勝感激。 先感謝您

compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

將其添加到gradle並清理整個項目並進行構建。如果仍然無法運行,請從計算機上卸載JAVA,然后重新安裝

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM