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

[Flutter] Flutter build error: invalid source release: 17

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

  1. Stack

    Stack Membro Participativo

    I am using hmssdk_flutter: ^1.10.6 to build live streaming app but while debugging I am getting

    FAILURE: Build failed with an exception.
    What went wrong:
    Execution failed for task ':hmssdk_flutter:compileDebugJavaWithJavac'.
    error: invalid source release: 17.


    Below I have given java version

    java version "1.8.0_341"
    Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
    Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)


    Flutter Version

    flutter --version
    Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision 761747bfc5 (4 months ago) • 2024-06-05 22:15:13 +0200
    Engine • revision edd8546116
    Tools • Dart 3.4.3 • DevTools 2.34.3


    Android Project Configuration (android/app/build.gradle):

    android {
    namespace = "com.example.demo2_hms_flutter_application"
    compileSdk = 34
    ndkVersion = flutter.ndkVersion

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

    defaultConfig {
    applicationId = "com.example.demo2_hms_flutter_application"
    minSdk = 21
    targetSdk = 34
    versionCode = flutterVersionCode.toInteger()
    versionName = flutterVersionName
    multiDexEnabled true
    }

    buildTypes {
    release {
    // TODO: Add your own signing config for the release build.
    // Signing with the debug keys for now, so `flutter run --release` works.
    signingConfig = signingConfigs.debug
    }
    }


    I would greatly appreciate any guidance or suggestions on how to resolve this issue. Thank you in advance for your insights!

    Continue reading...

Compartilhe esta Página