skip to Main Content

i have upgraded flutter to the newest version but getting this error now.
`* What went wrong:
Execution failed for task ‘:device_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 38s
Error: Gradle task assembleDebug failed with exit code 1
`

I have tried building clean and deleting .gradle folder, still not working

2

Answers


  1. hi you need to check you jdk version from android/build.gradle file, you can set the sourceCompatibility and targetCompatibility to match your Java version

    Login or Signup to reply.
  2. The problem was solved by updating Android Studio to the latest version

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