In our project we use gradle + retrolambda + proguard. Retrolambda incremental build is set to false.
Sometimes build passes without error but source code changes doesn't apply in app. To solve this problem we clean and rebuild project with
gradlew clean assembleDebug
but in our case it takes about 2.30 m. That is too long.
How we can solve this issue?
Generally proguard is only used for production builds. You can temporarily disable it by removing minifyEnabled true
and/or shrinkResources true
from your gradle.build to see if its causing the bottleneck.
Alternatively, go to Android Studio -> Preferences -> Build, Execution, Deployment -> Compiler -> and add "--offline" as a command line option. This will stop gradle from downloading dependencies on each build.
If you are running the latest Android Studio ( via the Canary Channel ) you can enable hotspot compilation using 'Instant Run': Android Studio -> Preferences -> Build, Execution, Deployment -> Instant Run -> Check 'Enable instant run...'. Just be aware that this feature is still experimental and you may run into bugs.
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