【问题标题】:Error:Execution failed for task ':app:dexDebug'. Process 'command java.exe finished with non-zero exit value 2错误:任务“:app:dexDebug”执行失败。 Process '命令 java.exe 以非零退出值 2 结束
【发布时间】:2015-10-24 16:52:24
【问题描述】:

我知道这个问题已被问过很多次,但我仍然无法找到解决方案。我检查了每一个可能的重复库,但没有找到。这是我的清单

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.dp.myquest"
    minSdkVersion 16
    targetSdkVersion 16
}

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

dependencies {
compile files('libs/abs.jar')
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/android-async-http-1.4.4.jar')
compile files('libs/android-query-full.0.26.7.jar')
compile files('libs/App42_ANDROID_SDK_3.0.1.jar')
compile files('libs/commons-collections4-4.0.jar')
compile files('libs/commons-net-3.3.jar')
compile files('libs/mail.jar')
compile files('libs/picasso-2.5.0.jar')
compile files('libs/universal-image-loader-1.9.3.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.facebook.android:facebook-android-sdk:3.19.0'
}

【问题讨论】:

  • 能否请您添加错误的完整堆栈跟踪

标签: java android


【解决方案1】:

与重复无关,问题是android对app中的dex文件有64k的限制。 您需要启用多索引。 这是你可以做到的 http://developer.android.com/tools/building/multidex.html

【讨论】:

  • 我启用它仍然是同样的错误。这段代码在 Eclipse 中运行良好。
猜你喜欢
  • 2015-06-27
  • 1970-01-01
  • 2015-10-17
  • 1970-01-01
  • 2015-08-12
  • 2016-04-15
  • 1970-01-01
  • 2016-02-23
  • 1970-01-01
相关资源
最近更新 更多