I drowned like 2 days to figure this out. Therefore, I return to posting the results here if it saves time:
This is caused by a bug in Jack that prevents the path classes from working properly . This is because Jack runs in-process (in the same JVM as the gradle daemon). Setting android.defaultConfig.jackOptions.jackInProcess
to false is beyond the scope of the Prerequisite error, but causes other problems (2 JVMs that support system resources) and errors that break the assembly in other ( worse ) ways.
Currently, the best solution is:
- Wait for Android gradle version 2.3, which already has a fix for this.
- Downgrade dagger to version 2.2, meanwhile. This is the highest version that seems to avoid a conflict with Guava and Jack.
EDIT: Update 1/14/2017:
I ran into several OTHER problems with Jack and was so tired of it that I switched to a retrolambda and kicked myself for not doing it before! Right now, Jack just seems to be causing more problems than he is solving. Just add lines with a plus and delete lines with a minus, and you can return to Dagger 2.8, waiting for Jack to act together!
+plugins { + id "me.tatarka.retrolambda" version "3.4.0" +} apply plugin: 'com.android.application' +apply plugin: 'me.tatarka.retrolambda' - jackOptions { - enabled true - }
For an even faster retrolambda build, add org.gradle.jvmargs=-Xmx4608M
to your gradle.properties
file gradle.properties
that the dexing process can happen in the process. Now I'm on Dagger 2.8, and my clean builds are just 12 seconds, GOOD RIDDANCE, JACK!
source share