You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter编译报错:invalid source release:17,JDK17仍无法解决

编译报错截图

编译报错求助:invalid source release: 17

每次编译都会触发报错:

Execution failed for task ':android_intent_plus:compileReleaseJavaWithJavac'. > error: invalid source release: 17

环境信息

  • JDK版本为17,Flutter为最新版
  • Android Studio版本:Koala Feature Drop | 2024.1.2 Patch 1,构建号#AI-241.19072.14.2412.12360217,2024年9月12日构建
  • 运行时版本:17.0.11+0--11852314 amd64
  • 虚拟机:JetBrains s.r.o. 提供的OpenJDK 64-Bit Server VM
  • 操作系统:Windows 11.0
  • 垃圾回收器:G1 Young Generation、G1 Old Generation
  • 内存:3072M
  • 核心数:6
  • 非捆绑插件:
    • org.jetbrains.plugins.go-template (241.14494.150)
    • Dart (241.18808)
    • com.localizely.flutter-intl (1.18.5-2023.2)
    • idea.plugin.protoeditor (241.15989.49)
    • dev.polek.adbwifi (1.2.6)
    • com.intellij.plugins.vscodekeymap (241.14494.150)
    • com.jetbrains.kmm (0.8.3(241)-9)
    • com.developerphil.adbidea (1.6.15)
    • org.jetbrains.compose.desktop.ide (1.6.2)
    • com.github.copilot (1.5.24.6840)
    • io.flutter (81.0.2)

关键现象

所有依赖JDK17的包都会触发该报错

已尝试更换JDK版本、更新Android Studio,但问题仍未解决,请求技术支持。


内容的提问来源于stack exchange,提问作者Ratul Hasan Ruhan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 06:44:53