flutter / flutter/flutter

Multiple Android DeviceLab tests fail with Android Studio RC bundled JDK 25 (OpenJDK 25.0.2) due to IllegalArgumentException: 25.0.2 during Gradle/Kotlin initialization

Open
#189,780 5 comments 1 reaction 2 assignees Claimed by @mboetger View on GitHub
from: manual-qa P1 platform-android t: gradle team-android tool triaged-android
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Install Android Studio RC (bundled OpenJDK 25.0.2).
2. Configure Flutter to use the RC JDK: flutter config --jdk-dir="/Applications/Android Studio RC.app/Contents/jbr/Contents/Home"
3. Verify Flutter is using the RC JDK: flutter doctor -v
4. 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

```dart
[Paste your code here]
```

### Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

### Logs

Logs

```console

[android_display_cutout_jdk25.log](https://github.com/user-attachments/files/30231142/android_display_cutout_jdk25.log)

```

### Flutter Doctor output

Doctor output

```console
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.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.