skip to Main Content

Launching libmain.dart on Android SDK built for x86 in debug mode…

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:package_info_plus:compileDebugJavaWithJavac’.

error: invalid source release: 17

  • Try:

Run with –stacktrace option to get the stack trace.
Run with –info or –debug option to get more log output.
Run with –scan to get full insights.

BUILD FAILED in 1m 23s
Running Gradle task ‘assembleDebug’… 86.6s
Error: Gradle task assembleDebug failed with exit code 1

I have tried and changed the jdk version but nothing happens

2

Answers


    • Try to create the Flutter project in Android Studio and open it from there, I think the folder has been excluded windows from Windows Defender.

    if didn’t work try to copy the jbr files to jre folder. jbr files

    Login or Signup to reply.
    1. clean your project using "flutter clean".

    2. downgrade package_info_plus version which you used in lsat time when your project runnig fine.

    3. if you didn’t use package_info_plus anytime in your project the put any in pubspec.yaml file like this :

      package_info_plus : any

    4. then flutter pub get

    5. run project

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search