black friday sale

Flat 10% off on the purchase of any two apps or more. Use coupon code - FESTIVAL10

Grab It Now
Check Mobile App
Read now
Start a Project

Enable Multidex in Android Application

Save

What is multidex file and why we need for the APK file?

Android application (APK) files contain executable bytecode files in the form of Dalvik Executable (DEX) files, which contain the compiled code used to run your app. The Dalvik Executable specification limits the total number of methods that can be referenced within a single DEX file to 65,536, including Android framework methods, library methods, and methods in your own code. Getting past this limit requires that you configure your app build process to generate more than one DEX file, known as a multidex configuration.

How to configure our application for multidex?

If ourminSdkVersion is set to 21 or higher, all we need to do is set multiDexEnabled to true in our module-level build.gradle file, as shown here:

however if our min Sdk Version is less than 21 then we need to following two steps to configure multidex.

step 1:- Modify the module-level build.gradle file to enable multidex and add the multidex library as a dependency, as shown here:

step 2:- Depending on whether we override the Application class, perform one of the following:

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Very good company, we did get app extension for Magento 2 website. The support was very good they help us through the process. Webkul team is very supportive, I would recommend them.

Yasser Mohamed

Yasser Mohamed

Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home