Repository navigation
Open
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listfrom: manual-qaIssue caught from manual QA processIssue caught from manual QA processplatform-androidAndroid applications specificallyAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Steps to reproduce
- Install Android Studio RC (bundled OpenJDK 25.0.2).
- Configure Flutter to use the RC JDK: flutter config --jdk-dir="/Applications/Android Studio RC.app/Contents/jbr/Contents/Home"
- Verify Flutter is using the RC JDK: flutter doctor -v
- From the Flutter repository, run a DeviceLab test, for example: dart bin/test_runner.dart test -t android_display_cutout or dart bin/test_runner.dart test -t android_defines
Expected results
Android Device lab tests should build and execute successfully using the latest Android Studio RC bundled JDK.
Actual results
The Gradle build fails before compilation begins with:
FAILURE: Build failed with an exception.
- What went wrong:
25.0.2
java.lang.IllegalArgumentException: 25.0.2
at org.jetbrains.kotlin.com.intellij.util.lang.JavaVersion.parse(...)
Note :
- The same Flutter checkout succeeds when configured to use the Android Studio Stable bundled JDK (OpenJDK 21.0.10).
- Issue repro in all flutter channels
Few of the Tests failed :
- dart bin/test_runner.dart test -t android_defines_test
- dart bin/test_runner.dart test -t android_display_cutout
- dart bin/test_runner.dart test -t android_picture_cache_complexity_scoring_perf__timeline_summary
- dart bin/test_runner.dart test -t android_verified_input_test
- dart bin/test_runner.dart test -t android_view_scroll_perf__timeline_summary
- dart bin/test_runner.dart test -t complex_layout_android__scroll_smoothness
- dart bin/test_runner.dart test -t embedded_android_views_integration_test
- dart bin/test_runner.dart test -t build_android_host_app_with_module_aar
- dart bin/test_runner.dart test -t build_android_host_app_with_module_source
Code sample
Code sample
[Paste your code here]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[android_display_cutout_jdk25.log](https://github.com/user-attachments/files/30231142/android_display_cutout_jdk25.log)
Flutter Doctor output
Doctor output
Flutter (Channel stable, 3.44.7, on macOS 26.5.2 25F84 darwin-arm64, locale en-US) [260ms]
• Flutter version 3.44.7 on channel stable at /Users/preethikandukuri/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 84fc5cbb22 (4 days ago), 2026-07-17 10:20:17 -0700
• Engine revision 69c8c61792
• Dart version 3.12.2
• DevTools version 2.57.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file,
enable-lldb-debugging, enable-uiscene-migration
[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [933ms]
• Android SDK at /Users/preethikandukuri/Library/Android/sdk
• Emulator version 37.1.9.0 (build_id 15834520) (CL:N/A)
• Platform android-37.0, build-tools 37.0.0
• ANDROID_HOME = /Users/preethikandukuri/Library/Android/sdk
• Java binary at: /Applications/Android Studio RC.app/Contents/jbr/Contents/Home/bin/java
This JDK is specified in your Flutter configuration.
To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 25.0.2+-15348964-b329.117)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 27.0) [628ms]
• Xcode at /Applications/Xcode-beta273.app/Contents/Developer
• Build 27A5218g
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [4ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (5 available) [6.4s]
• Pixel 10 (mobile) • 5A311FDCR0001H • android-arm64 • Android 17 (API
37)
• Pixel 10 (wireless) (mobile) • adb-5A311FDCR0001H-OVGQJY._adb-tls-connect._tcp • android-arm64 • Android 17 (API
37)
• iPad (wireless) (mobile) • 00008122-001A08DC22B9801C • ios • iOS 27.0
24A5390f
• macOS (desktop) • macos • darwin-arm64 • macOS 26.5.2
25F84 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome
150.0.7871.129
[✓] Network resources [1,124ms]
• All expected network resources are available.Reacted by Jonas Wanke
Metadata
Metadata
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listfrom: manual-qaIssue caught from manual QA processIssue caught from manual QA processplatform-androidAndroid applications specificallyAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Android"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
mbcorona commentedon Jul 21, 2026
Thanks for the report, @preethi0228-git. Routing to the infra team with fyi-android for further investigation.
mboetger commentedon Jul 21, 2026
I saw this issue on my own workflow yesterday, this happens when the java version is too new for the gradle version. Java 25 does not work with 8.14.
@mbcorona - this is not an infra issue since the user is running them locally.
@jesswrd - Are these tests already scheduled to be upgraded to 9.1?
jmagman commentedon Jul 22, 2026
The Flutter tool should give an actionable error when this happens instead of a tool crash and
IllegalArgumentException.jmagman commentedon Jul 22, 2026
Bumping this to a P1
mboetger commentedon Jul 23, 2026
I already have something in PR #188522
https://github.com/flutter/flutter/pull/188522/changes#diff-3c44d2e8279ea8d917b4fb942252d4649689154c36cf74227a1a2a879aaf1915R490-R533
Add java/gradle check when gradle crashes (flutter#189997)