flutter build aar fails during the javaDocDebugGeneration task when using the bundled JDK 25.0.2 from Android Studio RC. The build terminates with java.lang.IllegalArgumentException: 25.0.2
- Dominant language
- Dart
- Stars
- 179k
- Forks
- 31.1k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
1. Install Android Studio RC [ Android Studio Quali 3 RC 2 ]
2. Configure Flutter to use the bundled JDK from Android Studio RC.
flutter config --jdk-dir="/Applications/Android Studio RC.app/Contents/jbr/Contents/Home"
3. Create a Flutter module
flutter create -t module flutter_module
4. Navigate to the module[ cd flutter_module ]
5. Build the Android AAR. [ flutter build aar -v ]
### Expected results
flutter build aar completes successfully and generates the AAR artifacts.
### Actual results
The build fails during the javaDocDebugGeneration task with the following exception:
Caused by: java.lang.IllegalArgumentException: 25.0.2
at com.intellij.util.lang.JavaVersion.parse(...)
**Note** :
- The same Flutter project builds successfully when switching Flutter back to the bundled JDK 21.
### Code sample
Code sample
```dart
[Paste your code here]
```
### Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
### Logs
Logs
```console
[flutter_build_aar_jdk25.log](https://github.com/user-attachments/files/30355503/flutter_build_aar_jdk25.log)
```
### Flutter Doctor output
Doctor output
```console
[✓] Flutter (Channel master, 3.47.0-1.0.pre-169, on macOS 26.5.2 25F84 darwin-arm64, locale en-US) [1,463ms]
• Flutter version 3.47.0-1.0.pre-169 on channel master at /Users/preethikandukuri/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 468c2c9d78 (2 days ago), 2026-07-22 07:51:27 +0000
• Engine revision 468c2c9d78
• Dart version 3.14.0 (build 3.14.0-46.0.dev)
• DevTools version 2.60.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager,
omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration, enable-riscv64
[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [10.6s]
• 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) [858ms]
• Xcode at /Applications/Xcode-beta274.app/Contents/Developer
• Build 27A5228h
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [4ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Connected device (4 available) [6.2s]
• sdk gphone16k arm64 (mobile) • emulator-5554 • android-arm64 • Android 17 (API 37) (emulator)
• 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.187
[✓] Network resources [499ms]
• All expected network resources are available.
• No issues found!
```
Contributor guide
Research direction
Reproduce the failure with `flutter build aar -v` using Android Studio RC's bundled JDK 25, then compare it with the successful JDK 21 build. Start from the `javaDocDebugGeneration` task and the logged `JavaVersion.parse` exception; done means the AAR build completes successfully with JDK 25 and generates its artifacts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100