Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

The number of method references in a .dex file cannot exceed 64K. #583

@MickeyMouse623

Description

@MickeyMouse623

环境

 "react": "16.13.1",
 "react-native": "0.63.3",
 "react-native-wechat": "^1.9.12"

集成操作

在执行 yarn run android 命令后,编译环境报错,关键信息如下

The number of method references in a .dex file cannot exceed 64K.

解决方式

打开 android/app/build.gradle 文件

android {
    defaultConfig {
        ...
        multiDexEnabled true  // 增加这一行
    }
}

dependencies {
  implementation 'com.android.support:multidex:1.0.3' // 增加这一行
}

重新执行 yarn run android 命令即可编译通过。

错误无论在 'RN' 或者 'Flutter' 中遇到都可使用上述方式解决

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions