android - 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:
- 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
解决方案
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)
推荐阅读
- python - 为什么第二个循环中的 i 比用户给定的输入少 1?
- java - Javafx "Grid is already inside a scene-graph and cannot be set as root" error
- python - 使用 Selenium 在 div 中查找索引元素
- nginx - 使用 cURL 将文件上传到 Nginx
- nativescript - Nativescript:自定义组件响应慢和模块全局访问问题
- matlab - 具有附加列的数据透视表
- html - 仅在帖子中添加下划线链接
- ssas - OLAP 多维数据集中的错误 SUM 计算
- python - 使用 Python 和“无法识别的星期几”错误安排 Cron 作业
- r - 如何根据字符变量中的唯一值获取累积和?