androidfluttersigned-apk

Generate Signed APK - Error:java: invalid source release: 14


Recently I started with Flutter and made an app, now I am trying to sign the APK for the release version as documented in: https://developer.android.com/studio/publish/app-signing

I have searched a lot on the internet but I have absolutely no clue what I am doing wrong..

When I try to generate the signed APK with my Keystore I am running into an error:

** Error:java: invalid source release: 14

If I need to give some more information from the code I will update this question as soon as possible, please just ask me :)

Kind Regards,

Kevin


Solution

  • It seems you're using Java 1.8 to compile but in your android studio project you may have set the java language level to 14.

    In Android Studio, go to Project Structure -> Modules -> Properties and set Source Compatibility and Target Compatibility to 1.8 (Java 8)