Is there any way to display which process of my build is the one taking the most time and then try and work around it?
I am using Android Studio. I wouldn't call my project big at the moment but I guess the dependencies I require makes it larger and the build still takes between 40-60 seconds. (down from 90 seconds before removing multi dex)
Here are my Mid 2015 Macbook Pro's specs:
I have had to remove part of a dependency to be able to build without enabling multi dex support and this saved me ~20 seconds, however I want to add more dependencies so I need to improve my build time so I can then re-enable multi dex and actually use the dependencies I want to.
I have seen a few posts about modifying Android Studio to speed up the build time but these don't seem to have worked and I would rather see if I could fix the cause.
Here are my current dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// MY INTERNAL LIBRARIES
wearApp project(':wear')
compile project(':ViewPagerIndicator')
compile project(':connection-manager')
compile project(':core-library')
compile project(':activity-manager')
compile project(':activity-recorder')
compile 'com.google.android.gms:play-services-maps:7.5.0'
compile 'com.google.android.gms:play-services-wearable:7.5.0'
compile 'com.google.android.gms:play-services-location:7.5.0'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.1'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:support-annotations:22.2.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'joda-time:joda-time:2.7'
compile 'com.androidplot:androidplot-core:0.6.1'
compile project(':ParseLoginUI')
/*Images*/
compile 'com.squareup.picasso:picasso:2.3.3'
compile 'com.makeramen:roundedimageview:2.1.0' // https://github.com/vinc3m1/RoundedImageView
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'io.reactivex:rxandroid:1.0.1'
// apt 'com.google.dagger:dagger-compiler:2.0'
}
There are two main things you can do improve building speed:
This one is tricky. Usually your minSdkVersion
needs to be something like 14 or 16. This slow things down. If you compile using minSdkVerison = 22
speed times increase dramatically.
You can increase minSdkVersion
during development and reduce it when release.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With