1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Execution failed for task ':charset_converter:compileDebugKotlin'

Discussão em 'Mobile' iniciado por Stack, Outubro 9, 2024 às 15:52.

  1. Stack

    Stack Membro Participativo

    I get the error above when i try run my app on Android device. But only, if open my Flutter project. When i open only Android module, i don't get this error, and app runs fine. app/build.gradle seems like

    compileSdkVersion 34
    compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
    coreLibraryDesugaringEnabled true
    }

    kotlinOptions {
    jvmTarget = '17'
    }


    I use

    • Gradle 8.7.0
    • Kotlin 1.9.23
    • Android Studio LadyBug 2024.2.1
    • setted "Build, Execution, Deployment / Build tools / Gradle" Gradle JDK to "jbr-17" in Android Studio (btw i can set this only when i open only Android module, if i open Flutter project, this setting didn't show). Tried set Java to 21, 1.8, 11, but nothing helped, only the

    Execution failed for task ':charset_converter:compileDebugKotlin'. Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (17) and 'compileDebugKotlin' (21). Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation

    error mesage.

    No idea what to do.

    Continue reading...

Compartilhe esta Página