Many samples use old Gradle, impossible to build on modern JDK

未关闭
#2,568 0 条评论 2 个 reaction 已指派 1 人 在 GitHub 查看

@ericwindmill 已经在做这个了。

开始于 2025年1月27日。

  • #2873 来自 @GhagSagar23 —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

bug

E.g. running flutter build apk --debug in add_to_app/books/flutter_module_books results in:

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file '/Users/bartek/projects/flutter-samples/add_to_app/books/flutter_module_books/.android/settings.gradle' (/Users/bartek/.cache/gradle/caches/8.0/scripts/4pgstqpbdapknfa7p7f6rr9s5).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 67

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

* Get more help at https://help.gradle.org

BUILD FAILED in 2s

I'm using the latest stable JDK:

$ java --version
openjdk 23.0.2 2025-01-21
OpenJDK Runtime Environment Homebrew (build 23.0.2)
OpenJDK 64-Bit Server VM Homebrew (build 23.0.2, mixed mode, sharing)

Action item 1: update all samples to Gradle 8.12 (latest as of now)

Action item 2: maybe think of some automation to update those versions automatically?

主要语言
Dart
星标
19.3k
派生
7.8k
平均合并
1 天 18 小时
30 天内合并 PR
4

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

flutter/samples 的其他 Issue

查看 flutter/samples 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。