gradle - Android Studio build too slow multidex application
Date : March 29 2020, 07:55 AM
will help you If you are like me who already tried Vic Vu's solution but still can't avoid enabling multiDex then you can try this (as long as your are using a device that has Android 5.0 and above). Note This will only speed up your development build. Your production build will still be slow. 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'
}
defaultConfig {
applicationId "com.something.something"
targetSdkVersion 23
versionCode 1
versionName "1.0.0"
multiDexEnabled true
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
}
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
|
android studio 3.1.1 editing build.gradle file slow
Date : March 29 2020, 07:55 AM
|
Android Studio Gradle Build insanely slow
Date : March 29 2020, 07:55 AM
it fixes the issue So a branch was merged in at my work and now I'm getting too slow of build times. The only new addition to the gradle file was these two dependencies : , The issue was with a query with Room was too long and complicated.
|
Android studio very slow gradle build
Date : March 29 2020, 07:55 AM
|
VERY VERY slow Gradle build on Android Studio
Date : March 29 2020, 07:55 AM
|