We are getting an intermittent LinkageError with the Gradle daemon.
It seems very similar to the following issue: http://issues.gradle.org/browse/GRADLE-2912
This particular stack trace (https://gist.github.com/adrianbk/c4f04be70694af37633e) suggests that gradle cannot resolve the jacoco agent dependency but it happens with different dependencies at different times but always with a VerifyError on the class org/apache/http/HttpHost.
The only way we can get around it is by killing all running daemons and running all commands with the ‘–refresh-dependencies’ flag, this is ok on our CI environment as we can use the org.gradle.daemon arg but on our development environments there is always a Gradle daemon running because of Android Studio - it seems android studio insists on a daemon running in the background. We can kill the daemon process and run --refresh-dependencies but its proving very time consuming.
Project - Android app developed on Android Studio.
A unit test module which uses spock 0.7-groovy-2.0 & groovy 2.2.2
project has a buildSrc dir with some custom tasks unit tested with spock org.spockframework:spock-core:0.7-groovy-1.8 - Gradle version 1.12 (also occurs on 1.11) - Java version: 1.7 (also occurs on 1.6)
Any idea what may be causing it?