What was going on
Running flutter build appbundle with klippa_identity_verification_sdk in the project fails at :klippa_identity_verification_sdk:compileReleaseKotlin with "Unknown Kotlin JVM target: 21". The Android toolchain on the machine defaults to Java 21, which the SDK's Kotlin compile configuration does not recognize, so dependency resolution of the Kotlin compile task blows up. Environment: Flutter 3.24.3, Android SDK 35, macOS.

What fixed it
The reporter fixed it by changing the JavaVersion setting in the Android build configuration so the Kotlin compiler targets a JVM version the SDK supports instead of defaulting to Java 21. Align the project's Java version (e.g. set sourceCompatibility/targetCompatibility to Java 17 in android/app/build.gradle or the gradle.properties org.gradle.java.home) and rebuild the app bundle. Source: https://github.com/klippa-app/flutter-klippa-identity-verification-sdk/issues/28