Open luca992 opened 6 months ago
Encountered this as well, when pulled in via Maven as a dependency of ZCash Wallet Android SDK.
Prevents compilation, with a less informative error message than above. Seems same issue, however.
Full error log:
ERROR:/home/xxxxxx/.gradle/caches/modules-2/files-2.1/cash.z.ecc.android/kotlin-bip39-jvm/1.0.6/87c564f7322b53c0ec2d8f6cc6b0de5d3cf2b737/bip39-lib-jvm.jar: D8: java.lang.IllegalArgumentException: Unsupported class file major version 61
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform bip39-lib-jvm.jar (cash.z.ecc.android:kotlin-bip39-jvm:1.0.6) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=27, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
> Execution failed for DexingNoClasspathTransform: /home/xxxxxxx/.gradle/caches/modules-2/files-2.1/cash.z.ecc.android/kotlin-bip39-jvm/1.0.6/87c564f7322b53c0ec2d8f6cc6b0de5d3cf2b737/bip39-lib-jvm.jar.
> Error while dexing.
Just adding some further information:
It looks as though setting JVM_TARGET
in gradle.properties
is improper.
Seems there are compiler options in build.gradle.kts
that were missed, detailed here: https://kotlinlang.org/docs/gradle-compiler-options.html#for-all-kotlin-compilation-tasks
More specifically, jvmTarget
needs set, in Kotlin compiler options:
More details here: https://stackoverflow.com/questions/41113268/how-to-set-up-kotlins-byte-code-version-in-gradle-project-to-java-8
I think
JVM_TARGET=8
is not being applied correctly. Using this library in a project being compiled with less than jdk 17 fails with: