Enable Multidex for Android in Ionic framework

雨燕双飞 提交于 2019-12-01 07:18:08

问题


Is there a way to set enable multidex (https://github.com/casidiablo/multidex) for Android if I build apps using Ionic Framework ?


回答1:


There is a plugin that enables multidex. To install it, run:

cordova plugin add --save https://github.com/jwall149/cordova-multidex

And try building again. The build may take a little longer than usual, but your app should compile without troubles.




回答2:


For people using androidx and cordova-android: 8 is interested in this solution, I created a fork that supports the file structure and class names of these new versions. Also works with Ionic.

cordova plugin add --save https://github.com/c00/cordova-multidex

Note that this is only relevant if you are still supporting a minSdk less than 21. At 21, multidexing is no longer needed as there is some built-in fix for it. So in that case, just remove the multidex plugin (if you had it) and things should work.



来源:https://stackoverflow.com/questions/34259679/enable-multidex-for-android-in-ionic-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!