Enable Multidex for Android in Ionic framework

2020-03-20 12:57发布

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

4条回答
The star\"
2楼-- · 2020-03-20 13:43

Try this

cordova plugin add --save https://github.com/jwall149/cordova-multidex
查看更多
老娘就宠你
3楼-- · 2020-03-20 13:46

For those still having this issue, I've fixed it by installing cordova-plugin-multidex

cordova plugin add cordova-plugin-enable-multidex

Check it out: Multidex for Cordova

查看更多
\"骚年 ilove
4楼-- · 2020-03-20 13:54

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.

查看更多
啃猪蹄的小仙女
5楼-- · 2020-03-20 14:01

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.

查看更多
登录 后发表回答