Android studio 编译 The number of method references in a .dex file cannot exceed 64K.

it2026-02-25  7

出现这种情况的:工程在编译的时候方法超过dex最多储存范围65536,会抛出异常MultiDex。

解决方法:在 app 里面的build.gradle   android 加入   multiDexEnabled true

在 dependencies 加入 implementation 'com.android.support:multidex:1.0.1'

 

最新回复(0)