Skip to content

Commit ac880d2

Browse files
deepilyclaude
andcommitted
[LUPIN-MOBILE] Correct the claim that Android Studio bundles JDK 21, because Studio 2026.1 bundles the 25.0.3 that breaks the build
The compatibility table said "Android Studio bundled JDK — JBR 21 (since Ladybug 2024.2.1)" with no upper bound, which reads as a constant. It is not: Studio 2024.2 through 2025.3 bundle JBR 21, but Studio 2026.1 (Quail) bundles JBR 25.0.3. That line is what made "just point at Studio's bundled JBR" look like a free alternative to installing JDK 21, and on Rick's Studio it points straight at the Java that is failing. The row is now version-dependent and a dated correction note sits at the top of the document rather than in the table. Re-verified every other row: only the Flutter current-stable patch number moved (3.47.1 to 3.47.2). Gradle 8.12 still caps at Java 23, Java 25 still needs Gradle 9.1.0, AGP 9.4.0 still lists JDK 17 and no 25, and flutter/flutter#187223 is still open. Answered the new question the doctor output raised. The laptop builds with its own Flutter 3.35.1, not the vendored 3.32.0: the deploy script calls bare flutter, flutter build rewrites flutter.sdk in local.properties from whichever binary ran, and the rsync excludes the vendored SDK entirely. Flutter 3.35.1 lifts only the AGP cap, 8.7.3 to 8.9.1; the Gradle cap stays at 8.12 and the Java compatibility table is unchanged, so it buys no progress toward JDK 25. The recommendation to install a separate JDK 21 stands and is now the only path. Also noted two blockers that are independent of Java: unaccepted Android licences, and a terminal running under Rosetta. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
1 parent dcc7263 commit ac880d2

2 files changed

Lines changed: 147 additions & 11 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ src/lupin-mobile/
113113
- **[Spoken Quick Ask, One Leg — Implementation Plan](src/rnd/2026.09.11-spoken-ask-streamed-door-implementation-plan.md)** - The build plan for those rulings: a new `POST /api/v2/ask-audio` streaming two NDJSON lines (transcript, then the full `AskResponse` with the job ID), transcription and ask off the event loop, unique temp files; on the phone a review-first/send-immediately toggle, a stream reader in `QueueRepository`, one branch in `QuickAskBloc` reusing `_applyResolvedAsk`, and cancel-before-job-ID. Test matrix per tier. **Plan only; awaiting Rick's okay.**
114114
- **[Phone Device Session Script](src/rnd/2026.09.15-phone-device-session-script.md)** - Rick's ~20-minute handset sitting for rows `c51e92da` and `9b1f7701`: install a fresh wip build, run the network round-trip probe on wifi then LTE and pull the JSONL logs, then record ~10 real questions for the Opus 32 kbps accuracy comparison. Flags two preconditions: the bundled server address only works in the emulator, and the app deletes its WAV recordings after upload today.
115115

116-
- **[JDK 25 Build Failure — Why Upgrading Gradle Does Not Fix It](src/rnd/2026.09.15-jdk-gradle-flutter-compatibility.md)** - The laptop's JDK 25.0.3 breaks the build with a bare `25.0.3` as its whole error. Upgrading Gradle is not available to us: Flutter 3.32's `gradle_utils.dart` caps Gradle at 8.12 and AGP at 8.7.3, exactly what this repo pins — so Gradle 9 requires a Flutter upgrade first, and even AGP 9.4.0 still lists JDK 17, never 25. Compatibility table with sources, the three paths costed, and how far behind our vendored Flutter 3.32.0 is (five stables, ~15 months) with nothing in those releases this app needs. **Recommendation: point the build at JDK 21 (the LTS Android Studio itself bundles); no repo file changes.**
116+
- **[JDK 25 Build Failure — Why Upgrading Gradle Does Not Fix It](src/rnd/2026.09.15-jdk-gradle-flutter-compatibility.md)** - The laptop's JDK 25.0.3 breaks the build with a bare `25.0.3` as its whole error. Upgrading Gradle is not available to us: Flutter 3.32's `gradle_utils.dart` caps Gradle at 8.12 and AGP at 8.7.3, exactly what this repo pins — so Gradle 9 requires a Flutter upgrade first, and even AGP 9.4.0 still lists JDK 17, never 25. Compatibility table with sources, the three paths costed, and how far behind our vendored Flutter 3.32.0 is (five stables, ~15 months) with nothing in those releases this app needs. Carries a dated correction: the bundled Android Studio JDK is **not** a constant — Studio 2024.2–2025.3 bundle JBR 21 but **Studio 2026.1 (Quail) bundles JBR 25.0.3**, so reusing Studio's JBR is not an option on a current Studio. Also establishes that the laptop builds with its own Flutter **3.35.1**, not the vendored 3.32.0, and that 3.35.1 lifts only the AGP cap (8.7.3 → 8.9.1) while leaving the Gradle cap at 8.12 — zero progress toward JDK 25. Plus two independent blockers: unaccepted Android licences, and a terminal running under Rosetta. **Recommendation: install a separate JDK 21 and point the build at it; no repo file changes.**
117117

118118
### In-App Document Viewer (2026-09)
119119
- **[Abstract Doc-Link Viewer — Feasibility & Implementation Plan](src/rnd/2026.09.08-abstract-doc-link-viewer-feasibility.md)** - Can the app show an icon on abstracts that carry a doc link, and render the document in-app? Yes, and cheaper than expected: `/api/docs/file` returns **raw** markdown/text/code over the Dio that already injects the Bearer token, so no WebView and no second auth path. Covers the Flutter-vs-native-Android toolkit answer, the `flutter_markdown` discontinuation, the link shapes to parse, and a 4-phase plan. **Plan only; nothing implemented.**

‎src/rnd/2026.09.15-jdk-gradle-flutter-compatibility.md‎

Lines changed: 146 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
Date: 2026-09-15 · Author: Tiffany 💍 (research subagent, read-only) · Rows: c51e92da, 9b1f7701
44

5+
## Correction — 2026-09-15, later the same day
6+
7+
**This document said "Android Studio bundles JBR 21". That was wrong for the Studio Rick is
8+
running, and it is the line that produced a recommendation that cannot work.**
9+
10+
The original row read *"Android Studio bundled JDK — JBR 21 (since Ladybug 2024.2.1)"*, with no
11+
upper bound. Read literally it says: whatever Studio you have, its bundled Java is 21. So the
12+
obvious next move — *"skip the download, just point the build at Android Studio's bundled JBR"* —
13+
looked free. It is not free. **Android Studio 2026.1 (Quail) bundles JBR 25.0.3.** On that Studio
14+
the bundled JBR *is* the Java that is breaking the build, and Flutter is picking it up exactly as
15+
designed. Pointing at it is pointing at the problem.
16+
17+
A second thing was wrong with it: the working theory had been that Flutter "failed to detect Android
18+
Studio". It detected it fine. `flutter doctor -v` names the exact binary —
19+
`/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java`, version 25.0.3 — and
20+
resolving Studio's JBR first is the documented order. There is no detection bug to chase.
21+
22+
**The fix is unchanged and is now the only fix: install a separate JDK 21 and point Flutter at it**
23+
( `flutter config --jdk-dir=<jdk21>` ). "Reuse what Studio already ships" is off the table on Studio
24+
2026.1. The corrected, version-dependent row is in the table below.
25+
26+
Everything else in the compatibility table was re-checked on 2026-09-15 and still holds; see
27+
*Re-verification* under the table for what moved.
28+
529
## The question
630

731
The laptop build died with a bare `25.0.3` as its entire error. First recommendation was "install
@@ -19,8 +43,9 @@ maxKnownAndSupportedAgpVersion = '8.7.3'
1943
```
2044

2145
Those are **exactly** the versions this repo pins. We are already at Flutter 3.32's ceiling, so
22-
there is no Gradle 9 to move to without moving Flutter first. Flutter 3.32's own Java table tops out
23-
at Java 24.
46+
there is no Gradle 9 to move to without moving Flutter first. Flutter 3.32's own Java table stops at
47+
a `javaMax` of 24 — and that bound is exclusive, so the highest Java it knows about is 23.
48+
(Flutter 3.35.1 is identical here; see the third question below.)
2449

2550
And the destination is not supported either: **AGP has never listed JDK 25**. AGP 9.4.0 (Sept 2026,
2651
current) still says JDK 17 minimum and default. `flutter/flutter#187223`, "Java 25 Support in Flutter
@@ -38,14 +63,34 @@ suggested workaround is to use JDK 17 or 21.
3863
| AGP 9.0.1 (Jan 2026) | Gradle 9.1.0 min · JDK 17 min/default | [AGP 9.0 notes](https://developer.android.com/build/releases/agp-9-0-0-release-notes) |
3964
| AGP 9.4.0 (Sept 2026, latest) | Gradle 9.6.0 min · JDK 17 min/default · **no JDK 25 row** | [AGP release notes](https://developer.android.com/build/releases/gradle-plugin) |
4065
| Flutter 3.32.0 (vendored here) | Gradle ≤ 8.12, AGP ≤ 8.7.3 | repo `gradle_utils.dart:63,70` |
41-
| Flutter 3.47.0 (current) | templates AGP 9.1.0, Gradle 9.3.1, KGP 2.4.0; **Java 17 minimum** | [3.47 release notes](https://docs.flutter.dev/release/release-notes/release-notes-3.47.0) |
42-
| Android Studio bundled JDK | JBR **21** (since Ladybug 2024.2.1) | [Java versions in Android builds](https://developer.android.com/build/jdks) |
66+
| Flutter 3.47.x (current stable) | templates AGP 9.1.0, Gradle 9.3.1, KGP 2.4.0; **Java 17 minimum** | [3.47 release notes](https://docs.flutter.dev/release/release-notes/release-notes-3.47.0) |
67+
| Android Studio 2024.2 – 2025.3 (Ladybug · Meerkat · Narwhal · Otter · Panda) | bundles JBR **21** | [IntelliJ install guide](https://www.jetbrains.com/help/idea/installation-guide.html) (2025.3 platform ships JBR 21) |
68+
| Android Studio **2026.1 (Quail)** | bundles JBR **25.0.3** — the 2026.1 IntelliJ platform moved to JDK 25 | [JBR 25 releases](https://github.com/JetBrains/JetBrainsRuntime/releases) · Rick's own `flutter doctor -v` |
69+
70+
⚠️ **The bundled JBR is not a constant — it tracks the Studio version.** Never assume "Studio ships
71+
21". Check it: `"/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java" -version`.
4372

4473
## Is JDK 21 "old"?
4574

46-
No — it is the current LTS and what the Android toolchain ships and targets. Android Studio bundles
47-
JBR 21, and Flutter resolves Android Studio's bundled Java first, then `JAVA_HOME`, then PATH.
48-
JDK 25 is the *newer* one, not the *supported* one; nobody builds Android on 25 today.
75+
No — it is the current LTS and what the Android toolchain targets. Flutter resolves Android Studio's
76+
bundled Java first, then `JAVA_HOME`, then PATH — so on a Studio that bundles 21 you get 21 for
77+
free, and on Studio 2026.1 that same rule hands you the 25.0.3 that breaks the build. JDK 25 is the
78+
*newer* one, not the *supported* one; nobody builds Android on 25 today.
79+
80+
### Re-verification, 2026-09-15
81+
82+
Every row above was re-checked against current sources. **Two moved, neither changes the argument:**
83+
84+
| Row | Was | Now | Note |
85+
|---|---|---|---|
86+
| Android Studio bundled JDK | JBR 21, flat | version-dependent, 21 → 25.0.3 at Studio 2026.1 | the correction above |
87+
| Flutter current stable | 3.47.1 | 3.47.x — the docs site now reflects **3.47.2** | patch bump only |
88+
89+
Unchanged on re-check: Gradle 8.12 still caps at Java 23 · Java 24 still needs Gradle 8.14 · Java 25
90+
still needs Gradle 9.1.0 (Java 26 needs 9.4.0) · Gradle's own current release is now 9.7.1 · AGP
91+
9.4.0 (Sept 2026) is still the latest and still says **Gradle 9.6.0 minimum, JDK 17 min/default,
92+
with no JDK 25 row anywhere** · `flutter/flutter#187223` is still **open**, P2, assigned to the
93+
Flutter Android team, and still recommends JDK 17 or 21 as the workaround.
4994

5095
## The three paths
5196

@@ -60,8 +105,8 @@ not end in a supported JDK 25.
60105

61106
## Second question: how far behind is our Flutter, and is upgrading worth anything?
62107

63-
Vendored: **3.32.0**, stable, framework commit 2025-05-19, Dart 3.8.0. Current stable: **3.47.1**
64-
(2026-08-19), Dart 3.13.1 — five stable releases (3.35, 3.38, 3.41, 3.44, 3.47) and about 15 months.
108+
Vendored: **3.32.0**, stable, framework commit 2025-05-19, Dart 3.8.0. Current stable: **3.47.2**
109+
(the docs site's own stamp as of 2026-09-15), Dart 3.13.x — five stable releases (3.35, 3.38, 3.41, 3.44, 3.47) and about 15 months.
65110

66111
- **It is the only unlock for Gradle 9**, since `flutter_tools` refuses anything above its cap.
67112
3.44 introduced AGP 9 support; 3.47 ships AGP 9.1.0 / Gradle 9.3.1 / KGP 2.4.0 templates. But
@@ -75,14 +120,105 @@ Vendored: **3.32.0**, stable, framework commit 2025-05-19, Dart 3.8.0. Current s
75120
audio/recording fix for our stack, no security advisory. Under the standing policy — upgrade only
76121
when something breaks or something needed requires it — there is no compelling reason.
77122

123+
## Third question: the laptop runs Flutter 3.35.1, not the vendored 3.32.0 — does that change anything?
124+
125+
It does not. But it is worth spelling out, because the whole argument above was computed from
126+
3.32's caps and the laptop never loads 3.32.
127+
128+
### Which Flutter actually builds this app
129+
130+
**On the laptop: his own 3.35.1. The vendored 3.32.0 is not even present there.** Three reasons,
131+
each independently sufficient:
132+
133+
| Mechanism | What it does | Where |
134+
|---|---|---|
135+
| The deploy script calls bare `flutter` | `flutter pub get` · `flutter build apk --debug` — no path, so it resolves on `PATH` → `~/flutter/v3.35.1` | `src/scripts/build-and-deploy-lupin-mobile.sh` |
136+
| `flutter build` **rewrites** `flutter.sdk` | `updateLocalProperties()` sets `flutter.sdk` to the SDK root of whichever `flutter` binary ran | `gradle_utils.dart:751` (`Cache.flutterRoot`) |
137+
| The laptop rsync **excludes** `flutter/` | the vendored SDK is never copied to `~/Projects/lupin-mobile` | `src/scripts/rsync-lupin-mobile.sh` |
138+
139+
So `android/local.properties` does **not** pin the SDK — it is a generated cache of the last SDK
140+
that built, and Gradle only reads it back to locate `flutter_tools/gradle`
141+
( `android/settings.gradle.kts` ). It is tracked in git, which is why it churns per machine.
142+
`./flutter.sh` is the only way to get the vendored 3.32.0, and only on the dev server.
143+
144+
⇒ **His 3.35.1 is the relevant Flutter for any build he runs tonight.**
145+
146+
### What 3.35.1's caps actually are
147+
148+
Read from the 3.35.1 tag's own `gradle_utils.dart`, not from release notes:
149+
150+
| Constant | 3.32.0 (vendored) | 3.35.1 (his laptop) | Moved? |
151+
|---|---|---|---|
152+
| `maxKnownAndSupportedGradleVersion` | `8.12` | `8.12` | **no** |
153+
| `maxKnownAndSupportedAgpVersion` | `8.7.3` | `8.9.1` | yes |
154+
| `templateAndroidGradlePluginVersion` | `8.7.3` | `8.9.1` | yes |
155+
| `oneMajorVersionHigherJavaVersion` | `24` | `24` | no |
156+
| top `_javaGradleCompatList` row | `javaMin 23 · javaMax 24` (max exclusive) | identical | no |
157+
| top `_javaAgpCompatList` row | `javaMin 17 · javaDefault 17` | identical | no |
158+
159+
Source: [3.35.1 `gradle_utils.dart`](https://raw.githubusercontent.com/flutter/flutter/3.35.1/packages/flutter_tools/lib/src/android/gradle_utils.dart)
160+
vs. the vendored copy at `flutter/packages/flutter_tools/lib/src/android/gradle_utils.dart:32-73,881`.
161+
162+
### Does 3.35.1 get any closer to JDK 25? No — not one step
163+
164+
**The Gradle cap is the binding constraint and 3.35.1 did not touch it.** Still `8.12`; Gradle 8.12
165+
runs on Java 23 at most; Java 25 first runs on Gradle 9.1.0. 3.35.1 lifted only the *AGP* cap
166+
(8.7.3 → 8.9.1), which is a different axis and does nothing for Java — AGP's own floor and default
167+
is still 17 in every version shipped, 9.4.0 included. Its Java compatibility table is identical to
168+
3.32's, entry for entry. **Upgrading his local Flutter from 3.32 to 3.35 buys exactly zero JDK-25 progress**, and
169+
neither does any intermediate release before 3.44, which is where AGP 9 / Gradle 9 support lands.
170+
171+
**The JDK 21 recommendation is unchanged and is now the only path that works tonight.**
172+
173+
### Does the version skew itself hurt?
174+
175+
Mildly, and not in a way that blocks tonight:
176+
177+
- **The repo's pins are inside 3.35.1's caps**, so 3.35.1 builds this repo as-is: AGP `8.7.3`
178+
( `android/settings.gradle.kts` ) ≤ 8.9.1, Gradle `8.12` ( `gradle-wrapper.properties` ) = cap.
179+
No warning, no migration prompt.
180+
- **`pubspec.lock` is gitignored**, so the two machines resolve independently — the laptop against
181+
Dart 3.9.0, the dev server against 3.8.0. Contained, but it means a dep can be a different version
182+
on each side and nobody would see it in a diff.
183+
- **`.metadata` still records 3.32.0's revision** (`be698c48…`), which is tracked. `flutter migrate`
184+
would reason from that base, so do not run it from the laptop while the skew stands.
185+
- **`android/local.properties` is tracked and machine-specific**, and every `flutter build` rewrites
186+
it. Expect it to show as modified constantly; that is the tool, not a mistake.
187+
188+
The clean fix is to pick one Flutter and say so in the README. Not tonight's problem.
189+
190+
## Two gotchas that will stop a build regardless of Java
191+
192+
**`✗ Android license status unknown`** — his `flutter doctor` reports this, and it is an
193+
*independent* blocker: the Android toolchain check fails on it whatever JDK is selected. Fix:
194+
195+
```bash
196+
flutter doctor --android-licenses # accept each prompt
197+
```
198+
199+
Run it **after** pointing at JDK 21 — the licence tool runs on the selected JDK, so on 25.0.3 it can
200+
fail on its own.
201+
202+
**`darwin-arm64 (Rosetta)`** — Flutter appends that when the machine is arm64 but `uname -m` in the
203+
shell returns `x86_64`, i.e. the terminal itself is running translated
204+
( `flutter/packages/flutter_tools/lib/src/base/os.dart:383-386` ). It is almost always a leftover
205+
"Open using Rosetta" checkbox on Terminal.app. **It is not the cause of the `25.0.3` failure** and it
206+
does not change any Java, Gradle or AGP compatibility above — the Java the build uses is chosen by
207+
Flutter's JDK resolution, not by the shell's architecture. What it does cost is speed, since the
208+
Dart tool and its artifacts run x64-translated. To clear it: uncheck *Open using Rosetta* in
209+
Terminal's Get Info, or start the shell with `arch -arm64 zsh`, then re-run `flutter doctor -v`.
210+
78211
## How to check versions yourself
79212

80213
```bash
81214
./flutter.sh --version # the vendored SDK (this repo)
82-
flutter --version # the laptop's own install — will differ
215+
flutter --version # the laptop's own install — will differ (3.35.1 tonight)
83216
flutter upgrade --verify-only # shows what is available, changes nothing
84217
flutter doctor -v # shows which JDK Flutter resolved
85218
flutter analyze --suggestions # Flutter's own Java/Gradle/AGP compatibility report
219+
220+
# what Java does Android Studio actually bundle on THIS machine?
221+
"/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java" -version
86222
```
87223

88224
The repo's `flutter/` is excluded from the laptop rsync, so the first two commands answer about two

0 commit comments

Comments
 (0)