gpt4 book ai didi

java - Android Studio DexIndexOverflowException : method ID not in

转载 作者:IT老高 更新时间:2023-10-28 13:19:35 26 4
gpt4 key购买 nike

我使用 Android Studio 开发一个应用程序,我遇到了这个我不知道如何解决的错误。

com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]

:app:lintVitalRelease
:app:prePackageMarkerForRelease
:app:transformClassesWithDexForRelease FAILED
Error:Execution failed for task ':app:transformClassesWithDexForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
Information:BUILD FAILED
Information:Total time: 34.783 secs
Information:1 error

最佳答案

尝试在 build.gradle 中启用 multiDex:

android {

defaultConfig {
...

// Enabling multidex support.
multiDexEnabled true
}
...
}

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

这篇文章可能会有所帮助:DexIndexOverflowException issue after updating to latest appcompat and support library

关于java - Android Studio DexIndexOverflowException : method ID not in,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38714651/

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