Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] "Execution failed for task ':kiosk_mode:compileDebugKotlin'" ('compileDebugJavaWithJavac' (1.8)) #694

Closed
Kuhlemann opened this issue Oct 4, 2024 · 1 comment

Comments

@Kuhlemann
Copy link

Kuhlemann commented Oct 4, 2024

Android Studio Ladybug (2024.2.1) seems to be shipped with Java 21.

Since I updated Android Studio to Ladybug I get the following error when compiling my Android version:

Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (21).

When I remove kiosk_mode from pubspec.yaml my build (with a lot of other pub.dev-packages) compiles without any problems.
So the problem only occurs within kiosk_mode.

android\app\build.grade:

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_21
        targetCompatibility = JavaVersion.VERSION_21
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_21
    }

android\gradle\gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

android\settings.gradle:

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "8.7.0" apply false
    id "org.jetbrains.kotlin.android" version "1.9.24" apply false
}
@alboiuvlad29
Copy link
Contributor

Should be fixed by #695.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants