What is the problem?
Slow to build the app if the app is multi-dex (over 65K method). And the build time is taking more than 1mn.
What’s the solution?
We can configure to make build multi-dex faster. Your device just need to have Android Lollipop or up.
Configure gradle like below
android { productFlavors { // Define separate dev and prod product flavors. dev { // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin // to pre-dex each module and produce an APK that can be tested on // Android Lollipop without time consuming dex merging processes. minSdkVersion 21 } prod { // The actual minSdkVersion for the application. minSdkVersion 14 } } ... buildTypes { release { runProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile 'com.android.support:multidex:1.0.0' }
When building, select devDebug in Build variant
More detailed stuff from here: https://developer.android.com/studio/build/multidex.html