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

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

概述 Thenumberofmethodreferencesina.dexfilecannotexceed64K.这句话的意思翻译出来是:.dex文件中的方法引用数不能超过64K。我的理解:引用的第三方的方法超过了64K,需要在Android包下配置multidex减少第三方包引入(个人理解) 解决方案:在android/app/build.gradle中的

 

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  

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

 

总结

以上是内存溢出为你收集整理的flutter踩坑小记:The number of method references in a .dex file cannot exceed 64K.全部内容,希望文章能够帮你解决flutter踩坑小记:The number of method references in a .dex file cannot exceed 64K.所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1118156.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存