I upgraded butterknife
to 10.1.0 which throws this error:
Execution failed for task ':app:mergeDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform artifact 'butterknife-runtime.aar (com.jakewharton:butterknife-runtime:10.1.0)' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=19}
> Execution failed for DexingTransform: /Users/<REMOVED>/.gradle/caches/transforms-2/files-2.1/65b6816001722128222b6880d16907c6/jars/classes.jar.
> Error while dexing.
So I added to build.gradle:
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
However, the minSdkVersion
is 19, but Java 8 requires API >= 26 if I am not mistaking.
Just for test, when I try to use an Java 8 feature like stream
the compiler shows an error as expected:
Call requires API level 24 (current min is 19): java.util.Collection#stream
The projects compiles without error, but will butterknife just crash the app during runtime on a low Android version trying to use Java 8 language features?