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

这句话的意思翻译出来是:.dex文件中的方法引用数不能超过64K。

我的理解: 引用的第三方的方法超过了64K,需要在Android包下配置multidex减少第三方包引入(个人理解)

解决方案:

在android/app/build.gradle中的 dependencies 下添加 

implementation 'com.android.support:multidex:1.0.3'

在android/app/build.gradle中的 defaultConfig 下添加 

multiDexEnabled true

此方案不能保证一定解决问题,但可以试试。

 

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐