Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable Multidex for Android in Ionic framework

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

like image 266
Redturbo Avatar asked Dec 14 '15 04:12

Redturbo


People also ask

How do I enable multidex?

To enable Multidex, edit the build. gradle file at the module level: android { compileSdk 31 defaultConfig { ... minSdk 21 targetSdk 31 versionCode 1 versionName "1.0" multiDexEnabled true // Add this to enable Multidex testInstrumentationRunner "androidx.

What is multidex Android?

In Android, the compilers convert your source code into DEX files. This DEX file contains the compiled code used to run the app. But there is a limitation with the DEX file. The DEX file limits the total number of methods that can be referenced within a single DEX file to 64K i.e. 65,536 methods.

What is multidex used for?

They are indicated for all types of wounds, including dermal ulcers (e.g., leg ulcers, pressure ulcers and other secreting lesions), diabetic ulcers, abdominal wounds, infected wounds, superficial wounds, lacerations, cuts, abrasions, donor sites and second degree burns. Multidex Powder is indicated for moist wounds.


2 Answers

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.

like image 89
Grayda Avatar answered Sep 22 '22 06:09

Grayda


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

like image 24
nnimis Avatar answered Sep 24 '22 06:09

nnimis