2015-07-12 58 views
0

一邊跑我的項目,我得到這個錯誤。錯誤:執行任務':app:dexDebug'失敗。 > com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException

Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2 

任何人都可以告訴我如何改正它?

這是我的build.gradle文件:

apply plugin: 'com.android.application' 




android { 




compileSdkVersion 22 

    buildToolsVersion "23.0.0 rc2" 


    defaultConfig { 
     applicationId "com.example.shreyatakkar.student" 
     minSdkVersion 15 
     targetSdkVersion 22 
     versionCode 1 
     versionName "1.0" 
    } 
    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.2.0' 

} 
+0

郵政東西的Userful –

+0

這是重複的問題,請在stakeoverflow –

回答

1

我也被更新到了最新的Android Studio.I後有此錯誤由內defaultConfigbuild.gradle加入multiDexEnabled true固定它。

例子:

defaultConfig { 
    applicationId "com.example.shreyatakkar.student" 
    minSdkVersion 15 
    targetSdkVersion 22 
    versionCode 1 
    versionName "1.0" 
    multiDexEnabled true 
} 
+0

發現這是可能的,但我不這麼認爲。 –

+0

我做了,現在顯示此錯誤消息:錯誤:任務':app:packageAllDebugClassesForMultiDex'的執行失敗。 > java.util.zip.ZipException:重複的條目:安卓/支持/ V4/UTIL/LogWriter.class –

+0

我加入這個和它的工作! 配置 { 所有* .exclude組:「com.android.support」,模塊:「支持-V4」 } –

相關問題