gpt4 book ai didi

android - 应用程序 :dex DEBUG error in Android Studio

转载 作者:行者123 更新时间:2023-11-30 01:15:35 24 4
gpt4 key购买 nike

每次我尝试运行 android 项目时都会收到此错误

错误:任务 ':app:dexDebug' 执行失败。

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_11\bin\java.exe'' finished with non-zero exit value 1

Build.gradle 文件:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

Build.gradle模块:应用文件

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.0"

defaultConfig {
applicationId "java.ui.application3.android.learn.hisab"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"

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

dexOptions {
incremental = true;
preDexLibraries = false
javaMaxHeapSize "4g"
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
// classpath 'com.android.tools.build:gradle:1.4.0-beta6'

}

整个应用没有错误。请帮帮我我尝试了以下内容:1.重新清理并构建项目2. 使缓存/重启无效3. multiDexEnable true

没有效果...

请帮帮我

最佳答案

您在 app\gradle 中错过了 multidex

dependencies {
compile 'com.android.support:multidex:1.0.0 ...

关于android - 应用程序 :dex DEBUG error in Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37908476/

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