与
ESC
输入关键词搜索文章

Android studio Cannot fit requested classes in a single dex file (# methods: 77504 > 65536)

全文约 137 字预计阅读 1 分钟

Flutter kotlin编译错误

Execution failed for task ':app:mergeDexDebug'. > A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate > There was a failure while executing work items > A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. 解决方法如下: 应用内级别build.gradle添加:
android {
    defaultConfig {
        ...
        multiDexEnabled true
    }
}

dependencies {
  implementation 'com.android.support:multidex:1.0.3'
}
Android studio Cannot fit requested classes in a single dex file (# methods: 77504 > 65536)
分享

发表评论

评论 0 条

暂无评论,来说点什么吧。