flutter踩坑小记:The number of method references in a .dex file cannot exceed 64K.


 

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
 
 

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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM