2017-06-12 139 views
0

我無法以任何方式解決問題。我在等待你的幫助。Gradle - java.exe完成非零值退出1

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 22 
    buildToolsVersion "23.0.1" 
    defaultConfig { 
     multiDexEnabled = true 
     applicationId "com.apaweb.track" 
     minSdkVersion 16 
     targetSdkVersion 22 
     versionCode 14 
     versionName "2.0.3" 
    } 
    dexOptions { 
     javaMaxHeapSize "4g" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 

    compile 'com.android.support:appcompat-v7:22.+' 
    compile 'com.android.support:design:22.+' 
    compile 'com.android.support:cardview-v7:22.+' 
    compile 'com.android.support:recyclerview-v7:22.+' 

    compile 'com.google.android.gms:play-services:8.1.0' 
    compile 'com.mcxiaoke.volley:library:1.0.19' 
    compile 'com.tuenti.smsradar:library:1.0.4' 
    compile 'com.google.code.gson:gson:2.3.1' 
    compile 'com.android.support:multidex:1.0.0' 
    compile 'com.koushikdutta.ion:ion:2.+' 
    compile 'com.koushikdutta.async:androidasync:2.+' 

} 

我認爲這是更新java後的問題。 JDK 1.7,JDK 1.8JDK 9安裝在系統中。我現在使用JDK 1.7

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_80\bin\java.exe'' finished with non-zero exit value 1

Environment Variables

+0

'multiDexEnabled true' .Remove'='sign&use'compileSdkVersion 23' –

+1

NullPointerException:null,發生此錯誤。 –

+0

報告「java」打印什麼錯誤信息會更有意義,而不僅僅是聲明它以非零退出值退出的冗餘信息。 – EJP

回答

1

我解決了這個問題。通過升級Android Studio和Gradle版本。

相關問題