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

Flutter kotlin编译错误

Execution failed for task ‘:app:mergeDexDebug’.
> A failure occurred while executing
> There was a failure while executing work items
> A failure occurred while executing
> Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at

* 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.



android {
    defaultConfig {
        multiDexEnabled true

dependencies {
  implementation ''
此条目发表在服务器分类目录,贴了, 标签。将固定链接加入收藏夹。