gpt4 book ai didi

android - 任务 ':app:dexDebug:' 执行失败

转载 作者:行者123 更新时间:2023-12-03 05:15:25 25 4
gpt4 key购买 nike

我对 build.gradle 文件有疑问
我有这样的错误。

     ****

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-oracle/bin/java''
finished with non-zero exit value 2**

**

构建.gradle(模块)
apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "app_id"
minSdkVersion 17
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
jniLibs.srcDir 'jniLibs'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services:7.8.0'
compile group: 'com.tokbox', name: 'opentok-server-sdk', version: '2.2.2'
}

我在我的 bulild.gradle 中做了很多 chenges,但我做不到正确的一个

这是我的 Build.gradle(Project)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.google.gms:google-services:1.3.0-beta1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

我不知道如何避免这个错误帮助我
提前致谢

最佳答案

将此添加到您的文件构建中。毕业典礼

 defaultConfig {
multiDexEnabled true
}

关于android - 任务 ':app:dexDebug:' 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32328680/

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