Skip to content

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 #189988

Description

@preethi0228-git

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
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[flutter_build_aar_jdk25.log](https://github.com/user-attachments/files/30355503/flutter_build_aar_jdk25.log)

Flutter Doctor output

Doctor output
[✓] 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!

Activity

  1. added
    in triagePresently being triaged by the triage team
    platform-androidAndroid applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    team-androidOwned by Android platform team
    fyi-toolFor the attention of Flutter Tool team
    and removed
    in triagePresently being triaged by the triage team
    on Jul 27, 2026
  2. puneetkukreja98 commented on Jul 27, 2026

    @puneetkukreja98
    Contributor

    @preethi0228-git Thanks for reporting the issue, routing this to team-android for further investigation.

  3. jesswrd commented on Jul 28, 2026

    @jesswrd
    Contributor

    related to devicelab tests failing aginst jdk 25: #189780

  4. added
    triaged-androidTriaged by Android platform team
    P2Important issues not at the top of the work list
    on Jul 28, 2026
  5. jesswrd commented on Oct 28, 2026

    @jesswrd
    Contributor

    This is fixed on master and beta (3.50.0-0.1.pre+). The javaDocDebugGeneration failure happened because the module template's default AGP was 9.1.0. AGP 9.2 and earlier generate javadoc with Dokka 1.4.32, which bundles an old IntelliJ JavaVersion parser that throws IllegalArgumentException on JDK 25+. AGP 9.3 upgraded to Dokka 2.2.0, and #193262 bumped Flutter's module template to AGP 9.3.1, which resolves it. Until that reaches stable, use JDK 21 as a workaround.

  6. preethi0228-git commented on Nov 12, 2026

    @preethi0228-git
    Author

    Hi @jesswrd ,

    Verified the issue in latest master channel and now the flutter build aar completes successfully and generates the AAR artifacts without any errors.

    Flutter Doctor Output

     preethikandukuri@Preethis-MacBook-Pro ~ % flutter doctor -v
    [✓] Flutter (Channel master, 3.51.0-1.0.pre-91, on macOS 27.2 26B5112a darwin-arm64, locale en-US) [1,581ms]
        • Flutter version 3.51.0-1.0.pre-91 on channel master at /Users/preethikandukuri/development/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 9c427b5d7b (3 hours ago), 2026-11-12 09:34:35 +0000
        • Engine revision 9c427b5d7b
        • Dart version 3.15.0 (build 3.15.0-139.0.dev)
        • DevTools version 2.63.0-dev.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, enable-hcpp
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [6.0s]
        • Android SDK at /Users/preethikandukuri/Library/Android/sdk
        • Emulator version 37.3.9.0 (build_id 16863232) (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.4.1+-16818597-b635.79)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 27.3) [877ms]
        • Xcode at /Applications/Xcode273-beta.app/Contents/Developer
        • Build 27C5020n
        • CocoaPods version 1.16.2
    
    [✓] Chrome - develop for the web [5ms]
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Connected device (2 available) [6.4s]
        • macOS (desktop) • macos  • darwin-arm64   • macOS 27.2 26B5112a darwin-arm64
        • Chrome (web)    • chrome • web-javascript • Google Chrome 157.0.8103.38
        ! Error: Browsing on the local area network for iPad. Ensure the device is unlocked and attached with a cable or
          associated with the same local area network as this Mac.
          The device must be opted into Developer Mode to connect wirelessly. (code -27)
    
    [✓] Network resources [677ms]
        • All expected network resources are available.
    
    • No issues found!
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listfrom: manual-qaIssue caught from manual QA processfyi-toolFor the attention of Flutter Tool teamplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions