Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
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:
minSdkVersion
multiDexEnabled
true
build.gradle
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:
Application
android:name
<application>
MultiDexApplication
attachBaseContext()
MultiDex.install(this)
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.