Android compilation time with jack is extremely slow
Asked Answered
S

1

8

I recently upgraded to Java 8 and my computer is subsequently using jack to compile my android builds. Since I've switched, building the app on my device is taking an enormous amount of time; usually between 3-5 minutes. I changed the server timeout value in my .jack file to 1800 seconds and it still seems that the server timeout is set to 60 seconds. Has anybody had a similar problem?

Here is what my .jack file looks like:

SERVER_TIMEOUT=1800

EDIT: I recently upgraded my computer from a mid 2010 mac desktop computer to a late 2015 model. Although jack is still not compiling as quickly as I'd like, it has improved immensely. Where it used to take around 5 minutes to compile each time, now it only takes a little over a minute to compile. So for those facing a similar problem, perhaps this may give some extra insight in to solving your problem.

Shearer answered 7/9, 2016 at 16:9 Comment(3)
I've noticed this as well. Just to narrow it down a bit, it's enabling Jack that causes the slowness, not upgrading sourceCompatibility/targetCompatibility to JavaVersion.VERSION_1_8Lingerfelt
I'm starting to wonder if it was just my imagination due to the fact that Instant Run doesn't work with jack yet.Lingerfelt
What are your JVM heap options for android studio and gradle ?Jadwigajae
G
0

I was facing the same problem, and since I want to use java8 I decided to use retrolambda instead of jack compiler as it didn't slow down the build as the jack compiler does.

Guise answered 20/3, 2017 at 1:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.