gpt4 book ai didi

android - 错误 :Execution failed for task ':app:dexRelease' . 以非零退出值 2 结束

转载 作者:太空宇宙 更新时间:2023-11-03 16:25:22 27 4
gpt4 key购买 nike

我刚刚添加了paypal sdk,构建时出现如下错误:

Error:Execution failed for task ':app:dexRelease'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished with non-zero exit value 2

我看到很多帖子建议我添加

    multiDexEnabled true

但这不适用于 api 18 及以下版本。此外,它还给我的 facebook sdk 带来了其他错误。还有其他方法可以处理此错误吗?这是我的 build.gradle:

apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.edwardokoth.myapp"
minSdkVersion 15
targetSdkVersion 22
}

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

}

repositories { mavenCentral() }

dependencies {
compile files('libs/Parse-1.9.4.jar')
compile files('libs/ParseFacebookUtilsV4-1.9.4.jar')
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
compile fileTree(include: 'ParseFacebookUtilsV4-*.jar', dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'commons-io:commons-io:+'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:0.6.3'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
compile 'com.android.support:design:22.2.1'
compile 'com.paypal.sdk:paypal-android-sdk:2.12.4'
}

最佳答案

检查是否存在库冲突(库相同但版本不同)。在这种情况下,我想您应该从 Facebook SDK 中排除支持库模块。

compile ('com.facebook.android:facebook-android-sdk:4.6.0'){
exclude group: 'com.google.android', module: 'support-v4'
}

关于android - 错误 :Execution failed for task ':app:dexRelease' . 以非零退出值 2 结束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34580257/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com