Fixed
Status Update
Comments
az...@lyft.com <az...@lyft.com> #2
We are getting exact same error, 100% reproducible with Android Gradle Plugin 3.2.0-alpha03 no matter if build is clean or not.
In our case it fails during d8/desugar processing ofhttps://jcenter.bintray.com/io/github/lcm-proj/lcm/1.3.1/lcm-1.3.1.jar
One of the error messages before build failure:
```
[ERROR] [org.gradle.api.Project] D8: Default method desugaring of `info.monitorenter.gui.chart.Chart2D` failed because its super class `javax.swing.JPanel` is missing
```
We know that lcm library references classes unavailable on Android, but it's fine since we don't touch those paths in code to cause ClassNotFoundError. Looks like desugar thinks that it's critical and wants all classes to be in classpath during build which is wrong.
In our case it fails during d8/desugar processing of
One of the error messages before build failure:
```
[ERROR] [org.gradle.api.Project] D8: Default method desugaring of `info.monitorenter.gui.chart.Chart2D` failed because its super class `javax.swing.JPanel` is missing
```
We know that lcm library references classes unavailable on Android, but it's fine since we don't touch those paths in code to cause ClassNotFoundError. Looks like desugar thinks that it's critical and wants all classes to be in classpath during build which is wrong.
ag...@google.com <ag...@google.com>
sg...@google.com <sg...@google.com> #3
The issues causing build failures are actually at the top of the log, but it is not that obvious that that is the issue, and the error reporting here could also be improved:
D8: Classpath type already present: android.arch.core.internal.SafeIterableMap
D8: Classpath type already present: android.arch.lifecycle.Lifecycling
D8: Classpath type already present: android.arch.lifecycle.GenericLifecycleObserver
D8: Classpath type already present: android.arch.core.internal.SafeIterableMap
For D8 we don't allow the same type multiple times on the classpath used for compilation. For desugaring default methods we need classes from the compilation classpath. However in this setup several classes are defined several times causing this failure.
This is apparently too restrictive, as several libraries might ship the same classes. One solution will be to have an order on the classes on the classpath, and - like javac - pick the first one seen. There is a slight API issue here, as one of the APIs for adding classpath entries from paths, addClasspathFiles(Collection<Path> files), take a Collection and not a List or Iterator, so the API does not mandate any order. Fixing that will break the API. The other APIs for adding classpath entries does imply an order in which they are added.
D8: Classpath type already present: android.arch.core.internal.SafeIterableMap
D8: Classpath type already present: android.arch.lifecycle.Lifecycling
D8: Classpath type already present: android.arch.lifecycle.GenericLifecycleObserver
D8: Classpath type already present: android.arch.core.internal.SafeIterableMap
For D8 we don't allow the same type multiple times on the classpath used for compilation. For desugaring default methods we need classes from the compilation classpath. However in this setup several classes are defined several times causing this failure.
This is apparently too restrictive, as several libraries might ship the same classes. One solution will be to have an order on the classes on the classpath, and - like javac - pick the first one seen. There is a slight API issue here, as one of the APIs for adding classpath entries from paths, addClasspathFiles(Collection<Path> files), take a Collection and not a List or Iterator, so the API does not mandate any order. Fixing that will break the API. The other APIs for adding classpath entries does imply an order in which they are added.
yr...@google.com <yr...@google.com> #4
sg...@google.com <sg...@google.com> #5
The dependencies (generated with ./gradlew app:dependencies) to a simple test compilation using com.android.support.test.espresso:espresso-contrib:3.0.2-alpha1 is something like this:
debugAndroidTestCompileClasspath - Resolved configuration for compilation for variant: debugAndroidTest
+--- com.android.support.test:runner:1.0.1 -> 1.0.2-alpha1
| +--- com.android.support:support-annotations:27.0.2
| +--- com.android.support.test:monitor:1.0.2-alpha1
| | \--- com.android.support:support-annotations:27.0.2
| +--- junit:junit:4.12
| | \--- org.hamcrest:hamcrest-core:1.3
| \--- net.sf.kxml:kxml2:2.3.0
+--- com.android.support.test.espresso:espresso-contrib:3.0.2-alpha1
| +--- com.android.support.test.espresso:espresso-core:3.0.2-alpha1
| | +--- com.android.support.test:runner:1.0.2-alpha1 (*)
| | +--- com.android.support.test:rules:1.0.2-alpha1
| | | \--- com.android.support.test:runner:1.0.2-alpha1 (*)
| | +--- com.android.support.test.espresso:espresso-idling-resource:3.0.2-alpha1
| | +--- com.squareup:javawriter:2.1.1
| | +--- javax.inject:javax.inject:1
| | +--- org.hamcrest:hamcrest-library:1.3
| | | \--- org.hamcrest:hamcrest-core:1.3
| | +--- org.hamcrest:hamcrest-integration:1.3
| | | \--- org.hamcrest:hamcrest-library:1.3 (*)
| | \--- com.google.code.findbugs:jsr305:2.0.1
| +--- com.android.support.test.espresso:espresso-idling-resource:3.0.2-alpha1
| +--- com.android.support:design:27.0.2
| | +--- com.android.support:support-v4:27.0.2
| | | +--- com.android.support:support-compat:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- android.arch.lifecycle:runtime:1.0.3
| | | | +--- android.arch.lifecycle:common:1.0.3
| | | | \--- android.arch.core:common:1.0.0
| | | +--- com.android.support:support-media-compat:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | +--- com.android.support:support-core-utils:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | +--- com.android.support:support-core-ui:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | \--- com.android.support:support-fragment:27.0.2
| | | +--- com.android.support:support-compat:27.0.2 (*)
| | | +--- com.android.support:support-core-ui:27.0.2 (*)
| | | +--- com.android.support:support-core-utils:27.0.2 (*)
| | | \--- com.android.support:support-annotations:27.0.2
| | +--- com.android.support:appcompat-v7:27.0.2
| | | +--- com.android.support:support-annotations:27.0.2
| | | +--- com.android.support:support-core-utils:27.0.2 (*)
| | | +--- com.android.support:support-fragment:27.0.2 (*)
| | | +--- com.android.support:support-vector-drawable:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | \--- com.android.support:animated-vector-drawable:27.0.2
| | | +--- com.android.support:support-vector-drawable:27.0.2 (*)
| | | \--- com.android.support:support-core-ui:27.0.2 (*)
| | +--- com.android.support:recyclerview-v7:27.0.2
| | | +--- com.android.support:support-annotations:27.0.2
| | | +--- com.android.support:support-compat:27.0.2 (*)
| | | \--- com.android.support:support-core-ui:27.0.2 (*)
| | \--- com.android.support:transition:27.0.2
| | +--- com.android.support:support-annotations:27.0.2
| | \--- com.android.support:support-compat:27.0.2 (*)
| +--- com.android.support:recyclerview-v7:27.0.2 (*)
| +--- com.android.support:support-compat:27.0.2 (*)
| +--- com.android.support:support-core-utils:27.0.2 (*)
| \--- com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:2.0
| \--- org.hamcrest:hamcrest-core:1.3
+--- com.android.support:appcompat-v7:27.0.2 (*)
+--- com.android.support.constraint:constraint-layout:1.0.2
| \--- com.android.support.constraint:constraint-layout-solver:1.0.2
\--- com.android.support:design:27.0.2 (*)
One source of duplicate classpath entries is com.android.support.test.espresso:espresso-contrib:3.0.2-alpha1 and android.arch.lifecycle:common:1.0.3 both having e.g.g android.arch.lifecycle.* classes.
debugAndroidTestCompileClasspath - Resolved configuration for compilation for variant: debugAndroidTest
+--- com.android.support.test:runner:1.0.1 -> 1.0.2-alpha1
| +--- com.android.support:support-annotations:27.0.2
| +--- com.android.support.test:monitor:1.0.2-alpha1
| | \--- com.android.support:support-annotations:27.0.2
| +--- junit:junit:4.12
| | \--- org.hamcrest:hamcrest-core:1.3
| \--- net.sf.kxml:kxml2:2.3.0
+--- com.android.support.test.espresso:espresso-contrib:3.0.2-alpha1
| +--- com.android.support.test.espresso:espresso-core:3.0.2-alpha1
| | +--- com.android.support.test:runner:1.0.2-alpha1 (*)
| | +--- com.android.support.test:rules:1.0.2-alpha1
| | | \--- com.android.support.test:runner:1.0.2-alpha1 (*)
| | +--- com.android.support.test.espresso:espresso-idling-resource:3.0.2-alpha1
| | +--- com.squareup:javawriter:2.1.1
| | +--- javax.inject:javax.inject:1
| | +--- org.hamcrest:hamcrest-library:1.3
| | | \--- org.hamcrest:hamcrest-core:1.3
| | +--- org.hamcrest:hamcrest-integration:1.3
| | | \--- org.hamcrest:hamcrest-library:1.3 (*)
| | \--- com.google.code.findbugs:jsr305:2.0.1
| +--- com.android.support.test.espresso:espresso-idling-resource:3.0.2-alpha1
| +--- com.android.support:design:27.0.2
| | +--- com.android.support:support-v4:27.0.2
| | | +--- com.android.support:support-compat:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- android.arch.lifecycle:runtime:1.0.3
| | | | +--- android.arch.lifecycle:common:1.0.3
| | | | \--- android.arch.core:common:1.0.0
| | | +--- com.android.support:support-media-compat:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | +--- com.android.support:support-core-utils:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | +--- com.android.support:support-core-ui:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | \--- com.android.support:support-fragment:27.0.2
| | | +--- com.android.support:support-compat:27.0.2 (*)
| | | +--- com.android.support:support-core-ui:27.0.2 (*)
| | | +--- com.android.support:support-core-utils:27.0.2 (*)
| | | \--- com.android.support:support-annotations:27.0.2
| | +--- com.android.support:appcompat-v7:27.0.2
| | | +--- com.android.support:support-annotations:27.0.2
| | | +--- com.android.support:support-core-utils:27.0.2 (*)
| | | +--- com.android.support:support-fragment:27.0.2 (*)
| | | +--- com.android.support:support-vector-drawable:27.0.2
| | | | +--- com.android.support:support-annotations:27.0.2
| | | | \--- com.android.support:support-compat:27.0.2 (*)
| | | \--- com.android.support:animated-vector-drawable:27.0.2
| | | +--- com.android.support:support-vector-drawable:27.0.2 (*)
| | | \--- com.android.support:support-core-ui:27.0.2 (*)
| | +--- com.android.support:recyclerview-v7:27.0.2
| | | +--- com.android.support:support-annotations:27.0.2
| | | +--- com.android.support:support-compat:27.0.2 (*)
| | | \--- com.android.support:support-core-ui:27.0.2 (*)
| | \--- com.android.support:transition:27.0.2
| | +--- com.android.support:support-annotations:27.0.2
| | \--- com.android.support:support-compat:27.0.2 (*)
| +--- com.android.support:recyclerview-v7:27.0.2 (*)
| +--- com.android.support:support-compat:27.0.2 (*)
| +--- com.android.support:support-core-utils:27.0.2 (*)
| \--- com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:2.0
| \--- org.hamcrest:hamcrest-core:1.3
+--- com.android.support:appcompat-v7:27.0.2 (*)
+--- com.android.support.constraint:constraint-layout:1.0.2
| \--- com.android.support.constraint:constraint-layout-solver:1.0.2
\--- com.android.support:design:27.0.2 (*)
One source of duplicate classpath entries is com.android.support.test.espresso:espresso-contrib:3.0.2-alpha1 and android.arch.lifecycle:common:1.0.3 both having e.g.g android.arch.lifecycle.* classes.
ga...@google.com <ga...@google.com> #6
I've filled https://issuetracker.google.com/73722050 , as espresso-contrib should rename or not package those classes.
fr...@gmail.com <fr...@gmail.com> #7
I see similar error in our project with Gson:
:app:transformClassesWithDexBuilderForFlavourDebugD8: Classpath type already present: com.google.gson.JsonDeserializer
D8: Classpath type already present: com.google.gson.JsonSerializer
D8: Classpath type already present: com.google.gson.reflect.TypeToken
D8: Classpath type already present: com.google.gson.internal.$Gson$Preconditions
D8: Classpath type already present: com.google.gson.internal.$Gson$Preconditions
D8: Classpath type already present: com.google.gson.stream.JsonReader
D8: Classpath type already present: com.google.gson.internal.bind.util.ISO8601Utils
D8: Classpath type already present: com.google.gson.reflect.TypeToken
Via gradlew :app:dependencies I can see that one of our libraries is including "com.google.code.gson:gson:2.8.0" and "com.android.databinding:compiler:3.2.0-alpha04" is including "com.google.code.gson:gson:2.7" that for some reason does not get upgraded. If I add "resolutionStrategy.force "com.google.code.gson:gson:2.8.0", the build succeeds.
:app:transformClassesWithDexBuilderForFlavourDebugD8: Classpath type already present: com.google.gson.JsonDeserializer
D8: Classpath type already present: com.google.gson.JsonSerializer
D8: Classpath type already present: com.google.gson.reflect.TypeToken
D8: Classpath type already present: com.google.gson.internal.$Gson$Preconditions
D8: Classpath type already present: com.google.gson.internal.$Gson$Preconditions
D8: Classpath type already present: com.google.gson.stream.JsonReader
D8: Classpath type already present: com.google.gson.internal.bind.util.ISO8601Utils
D8: Classpath type already present: com.google.gson.reflect.TypeToken
Via gradlew :app:dependencies I can see that one of our libraries is including "com.google.code.gson:gson:2.8.0" and "com.android.databinding:compiler:3.2.0-alpha04" is including "com.google.code.gson:gson:2.7" that for some reason does not get upgraded. If I add "resolutionStrategy.force "com.google.code.gson:gson:2.8.0", the build succeeds.
sg...@google.com <sg...@google.com> #8
We have a fix pending for Android Studio to handle the duplication by using the first definition found on the classpath when compiling. However that change did not make it into the RC1 build.
sg...@google.com <sg...@google.com>
so...@gmail.com <so...@gmail.com> #9
This is still happening in AS 3.1-RC2. It's not fixed for me.
sg...@google.com <sg...@google.com> #10
Pablo, can you share some more information on your project setup, as with the project I used I don't see the error any more.
The test application I used had the build.gradle below, and running a simple test with Android Studio 3.1.0 beta3 logged the following when building the test:
AGPBI: {"kind":"error","text":"Classpath type already present: android.arch.lifecycle.GenericLifecycleObserver","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Classpath type already present: android.arch.core.internal.SafeIterableMap","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Classpath type already present: android.arch.lifecycle.Lifecycling","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Classpath type already present: android.arch.core.internal.SafeIterableMap","sources":[{}],"tool":"D8"}
and the test could not be built.
After upgrading to Android Studio 3.1.0 RC2 (and letting Android Studio upgrade the Gradle plugin used) I don't get these errors any more, and the test can build and run.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.sgjesse.myapplication"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '27.0.3'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestImplementation ('com.android.support.test.espresso:espresso-contrib:3.0.2-alpha1'){
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'design'
//exclude group: 'android.arch.lifecycle', module: 'runtime'
}
}
The test application I used had the build.gradle below, and running a simple test with Android Studio 3.1.0 beta3 logged the following when building the test:
AGPBI: {"kind":"error","text":"Classpath type already present: android.arch.lifecycle.GenericLifecycleObserver","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Classpath type already present: android.arch.core.internal.SafeIterableMap","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Classpath type already present: android.arch.lifecycle.Lifecycling","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Classpath type already present: android.arch.core.internal.SafeIterableMap","sources":[{}],"tool":"D8"}
and the test could not be built.
After upgrading to Android Studio 3.1.0 RC2 (and letting Android Studio upgrade the Gradle plugin used) I don't get these errors any more, and the test can build and run.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.sgjesse.myapplication"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '27.0.3'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestImplementation ('com.android.support.test.espresso:espresso-contrib:3.0.2-alpha1'){
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'design'
//exclude group: 'android.arch.lifecycle', module: 'runtime'
}
}
Description
Android Plugin Version: 3.1.0-beta3
Module Compile Sdk Version: 27
Module Build Tools Version: latest
Android SDK Tools version: 26.1.1
Compiling a test APK with the latest Espresso release fails with android.enableD8.desugaring=true.
It succeeds with android.enableD8.desugaring=false.
See log below.
D8: Classpath type already present: android.arch.core.internal.SafeIterableMap
D8: Classpath type already present: android.arch.lifecycle.Lifecycling
D8: Classpath type already present: android.arch.lifecycle.GenericLifecycleObserver
D8: Classpath type already present: android.arch.core.internal.SafeIterableMap
/Users/jrod/.gradle/caches/transforms-1/files-1.1/espresso-core-3.0.2-alpha1.aar/a874cd4f62ccb9c3623980c29055d904/jars/classes.jar: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `sun.misc.Unsafe android.support.test.espresso.core.internal.deps.guava.cache.Striped64.getUnsafe()`
/Users/jrod/.gradle/caches/transforms-1/files-1.1/espresso-core-3.0.2-alpha1.aar/a874cd4f62ccb9c3623980c29055d904/jars/classes.jar: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `void android.support.test.espresso.core.internal.deps.guava.util.concurrent.AbstractFuture$UnsafeAtomicHelper.<clinit>()`
/Users/jrod/.gradle/caches/transforms-1/files-1.1/espresso-core-3.0.2-alpha1.aar/a874cd4f62ccb9c3623980c29055d904/jars/classes.jar: D8: Type `libcore.io.Memory` was not found, it is required for default or static interface methods desugaring of `byte android.support.test.espresso.core.internal.deps.protobuf.UnsafeUtil$Android32MemoryAccessor.getByte(long)`
/Users/jrod/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar: D8: Type `java.lang.management.ManagementFactory` was not found, it is required for default or static interface methods desugaring of `void org.junit.rules.DisableOnDebug.<init>(org.junit.rules.TestRule)`
/Users/jrod/.gradle/caches/transforms-1/files-1.1/espresso-core-3.0.2-alpha1.aar/a874cd4f62ccb9c3623980c29055d904/jars/classes.jar: D8: Type `com.google.devtools.build.android.desugar.runtime.ThrowableExtension` was not found, it is required for default or static interface methods desugaring of `java.lang.String android.support.test.espresso.core.internal.deps.guava.base.Throwables.getStackTraceAsString(java.lang.Throwable)`
/Users/jrod/.gradle/caches/transforms-1/files-1.1/espresso-core-3.0.2-alpha1.aar/a874cd4f62ccb9c3623980c29055d904/jars/classes.jar: D8: Type `libcore.io.Memory` was not found, it is required for default or static interface methods desugaring of `byte android.support.test.espresso.core.internal.deps.protobuf.UnsafeUtil$Android64MemoryAccessor.getByte(long)`
/Users/jrod/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar: D8: Type `java.lang.management.ManagementFactory` was not found, it is required for default or static interface methods desugaring of `long org.junit.internal.runners.statements.FailOnTimeout.cpuTime(java.lang.Thread)`
/Users/jrod/.gradle/caches/transforms-1/files-1.1/espresso-core-3.0.2-alpha1.aar/a874cd4f62ccb9c3623980c29055d904/jars/classes.jar: D8: Type `com.google.android.apps.common.testing.testrunner.web.JavaScriptBridge` was not found, it is required for default or static interface methods desugaring of `android.support.test.espresso.web.action.JavascriptEvaluation$PreparedScript android.support.test.espresso.web.action.JavascriptEvaluation$ScriptPreparer.apply(android.support.test.espresso.web.action.JavascriptEvaluation$UnpreparedScript)`
/Users/jrod/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/1.10.19/e8546f5bef4e061d8dd73895b4e8f40e3fe6effe/mockito-core-1.10.19.jar: D8: Interface `org.mockito.asm.signature.SignatureVisitor` not found. It's needed to make sure desugaring of `org.mockito.asm.util.TraceSignatureVisitor` is correct. Desugaring will assume that this interface has no default method.
/Users/jrod/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/1.10.19/e8546f5bef4e061d8dd73895b4e8f40e3fe6effe/mockito-core-1.10.19.jar: D8: Interface `org.mockito.asm.signature.SignatureVisitor` not found. It's needed to make sure desugaring of `org.mockito.asm.util.CheckSignatureAdapter` is correct. Desugaring will assume that this interface has no default method.
/Users/jrod/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/1.10.19/e8546f5bef4e061d8dd73895b4e8f40e3fe6effe/mockito-core-1.10.19.jar: D8: Type `java.beans.Introspector` was not found, it is required for default or static interface methods desugaring of `java.beans.PropertyDescriptor[] org.mockito.cglib.core.ReflectUtils.getPropertiesHelper(java.lang.Class, boolean, boolean)`
/Users/jrod/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-integration/1.3/5de0c73fef18917cd85d0ab70bb23818685e4dfd/hamcrest-integration-1.3.jar: D8: Type `org.easymock.EasyMock` was not found, it is required for default or static interface methods desugaring of `org.easymock.IArgumentMatcher org.hamcrest.integration.EasyMock2Adapter.adapt(org.hamcrest.Matcher)`
/Users/jrod/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-integration/1.3/5de0c73fef18917cd85d0ab70bb23818685e4dfd/hamcrest-integration-1.3.jar: D8: Interface `org.easymock.IArgumentMatcher` not found. It's needed to make sure desugaring of `org.hamcrest.integration.EasyMock2Adapter` is correct. Desugaring will assume that this interface has no default method.
/Users/jrod/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-integration/1.3/5de0c73fef18917cd85d0ab70bb23818685e4dfd/hamcrest-integration-1.3.jar: D8: Interface `org.jmock.core.Constraint` not found. It's needed to make sure desugaring of `org.hamcrest.integration.JMock1Adapter` is correct. Desugaring will assume that this interface has no default method.
/Users/jrod/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/4785a3c21320980282f9f33d0d1264a69040538f/hamcrest-library-1.3.jar: D8: Type `java.beans.Introspector` was not found, it is required for default or static interface methods desugaring of `java.beans.PropertyDescriptor[] org.hamcrest.beans.PropertyUtil.propertyDescriptorsFor(java.lang.Object, java.lang.Class)`
/Users/jrod/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/23.4-android/6b52ce80a01cdd1bda08d81d2e4035e5399ee903/guava-23.4-android.jar: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `sun.misc.Unsafe com.google.common.hash.Striped64.getUnsafe()`
/Users/jrod/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/23.4-android/6b52ce80a01cdd1bda08d81d2e4035e5399ee903/guava-23.4-android.jar: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `sun.misc.Unsafe com.google.common.hash.LittleEndianByteArray$UnsafeByteArray.getUnsafe()`
/Users/jrod/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/23.4-android/6b52ce80a01cdd1bda08d81d2e4035e5399ee903/guava-23.4-android.jar: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `sun.misc.Unsafe com.google.common.cache.Striped64.getUnsafe()`
/Users/jrod/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/23.4-android/6b52ce80a01cdd1bda08d81d2e4035e5399ee903/guava-23.4-android.jar: D8: Type `sun.misc.Unsafe` was not found, it is required for default or static interface methods desugaring of `sun.misc.Unsafe com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator.getUnsafe()`
> Task :app:transformClassesWithDexBuilderForInternalDebugAndroidTest
com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/jrod/.gradle/caches/transforms-1/files-1.1/espresso-contrib-3.0.2-alpha1.aar/f4074cbfcd00531adfb6ff74b92f03a1/jars/classes.jar
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
at com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:146)
at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.transform(DexArchiveBuilderTransform.java:306)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:221)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:217)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:212)
at sun.reflect.GeneratedMethodAccessor2299.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipCachedTaskExecuter.execute(SkipCachedTaskExecuter.java:103)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:63)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:623)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:578)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/jrod/.gradle/caches/transforms-1/files-1.1/espresso-contrib-3.0.2-alpha1.aar/f4074cbfcd00531adfb6ff74b92f03a1/jars/classes.jar
at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:803)
at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.lambda$convertToDexArchive$8(DexArchiveBuilderTransform.java:728)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:132)
at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:109)
at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:798)
... 6 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:76)
at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:45)
at com.android.tools.r8.D8.run(D8.java:88)
at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:107)
... 7 more
Caused by: com.android.tools.r8.utils.AbortException
at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:77)
at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:58)
at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:67)
... 10 more
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForInternalDebugAndroidTest'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/jrod/.gradle/caches/transforms-1/files-1.1/espresso-contrib-3.0.2-alpha1.aar/f4074cbfcd00531adfb6ff74b92f03a1/jars/classes.jar