0

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:

  • Information:java: Errors occurred while compiling module 'vista_presentie'
  • Information:javac 1.8.0_242-release was used to compile java sources
  • Information:Module "vista_presentie" was fully rebuilt due to project configuration/dependencies changes
  • Information:28-10-2020 19:42 - Build completed with 1 error and 0 warnings in 5 s 852 ms

** 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

Adithya Shetty
  • 1,247
  • 16
  • 30

1 Answers1

0

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)

finrodd
  • 226
  • 1
  • 4
  • 1
    Thank you for your answer. Sorry but I'm pretty new with Android Studio and can't find the properties in the module. I've added a screenshot of the module dialog. http://kevinstevelmans.com/module_dialog_android_studio.png Hope this is the right module dialog you described :) – K. Stevelmans Oct 28 '20 at 22:45
  • You can see on your screenshot that the language level is "Project Default (14)", change it to 8, it should compile – finrodd Oct 29 '20 at 02:35
  • Hmm okay, that fixed the java invalid source relase error, but now I got some other errors. Made also a screenshot of the errors and the file where the erros are comming from. Errors: https://www.kevinstevelmans.com/android-studio/errors_android_studio.png AndroidManifest.xml file: https://www.kevinstevelmans.com/android-studio/androidManifest.xml_android_studio.png – K. Stevelmans Oct 29 '20 at 08:06
  • This is a different issue, your project is missing few resources as described in the errors you're getting. For example ic_launcher describes your app icon. Have a look at the official documentation for more info https://developer.android.com/guide/topics/resources/providing-resources – finrodd Oct 29 '20 at 13:24