Skip to content

Android examples fail to compile with latest Android Studio RC/JDK due to BuildConfig.java warning treated as error (-Werror) #190069

Closed
flutter/packages
#13031

Description

@preethi0228-git

Steps to reproduce

  1. Use the latest Flutter stable channel.
  2. Update the packages repository to the latest revision.
  3. Use the latest Android Studio RC.
  4. Run:

dart run script/tool/bin/flutter_plugin_tools.dart drive-examples --android --packages url_launcher_android

or

dart run script/tool/bin/flutter_plugin_tools.dart drive-examples --android --packages in_app_purchase_android

Packages checkout version : 4ac796d48e760882d6e68cde3dc94f3ddd8936a6

Expected results

The example application should build successfully and the integration tests should execute.

Actual results

The build fails during Java compilation before the integration tests start.

For both packages, the generated BuildConfig.java produces the following warning, which is promoted to an error because the build uses -Werror:

warning: [dangling-doc-comments] documentation comment is not attached to any declaration

error: warnings found and -Werror specified

This causes the Gradle build to fail.

Sample output

error: warnings found and -Werror specified

BuildConfig.java:1: warning: [dangling-doc-comments]
documentation comment is not attached to any declaration

Execution failed for task ':url_launcher_android:compileDebugJavaWithJavac'.

The same issue is also reproducible for

  • in_app_purchase_android

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

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

[in_app_purchase_android.log](https://github.com/user-attachments/files/30420328/in_app_purchase_android.log)

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.44.8, on macOS 26.5.2 25F84 darwin-arm64, locale en-US) [495ms]
    • Flutter version 3.44.8 on channel stable at /Users/preethikandukuri/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 058e0af2c2 (4 days ago), 2026-07-23 10:56:21 -0700
    • Engine revision 0cd610717b
    • 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) [8.5s]
    • 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) [1,013ms]
    • Xcode at /Applications/Xcode-beta274.app/Contents/Developer
    • Build 27A5228h
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [3ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (4 available) [6.3s]
    • Pixel 10 (mobile)        • 5A311FDCR0001H            • 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.187

[✓] Network resources [2.4s]
    • All expected network resources are available.

• No issues found!

Activity

  1. added
    in triagePresently being triaged by the triage team
    platform-androidAndroid applications specifically
    t: gradle"flutter build" and "flutter run" on Android
    team-androidOwned by Android platform team
    and removed
    in triagePresently being triaged by the triage team
    on Jul 28, 2026
  2. added
    triaged-androidTriaged by Android platform team
    P2Important issues not at the top of the work list
    on Jul 28, 2026
  3. jesswrd commented on Jul 28, 2026

    @jesswrd
    Contributor

    from triage: this might be a good opp to evaluate whether or not we should match our CI to test against the jdk version bundled with android studio.

  4. preethi0228-git commented on Oct 5, 2026

    @preethi0228-git
    Author

    Verified these tests in the latest Stable channel (3.47.6) and they are passing now.

    Tests :

    1. dart run script/tool/bin/flutter_plugin_tools.dart drive-examples --android --packages url_launcher_android
    2. dart run script/tool/bin/flutter_plugin_tools.dart drive-examples --android --packages in_app_purchase_android
    3. dart run script/tool/bin/flutter_plugin_tools.dart drive-examples --android --packages camera_android
    Image Image Image

    Flutter doctor output

    [✓] Flutter (Channel stable, 3.47.6, on macOS 27.2 26B5086k darwin-arm64, locale en-US) [727ms]
        • Flutter version 3.47.6 on channel stable at /Users/preethikandukuri/development/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 5fc346839b (5 days ago), 2026-09-30 15:02:49 -0700
        • Engine revision 692136cb65
        • Dart version 3.13.5
        • 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
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [785ms]
        • Android SDK at /Users/preethikandukuri/Library/Android/sdk
        • Emulator version unknown
        • 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.3+-15898627-b508.16)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 27.1) [1,405ms]
        • Xcode at /Applications/Xcode271.app/Contents/Developer
        • Build 27A9269
        • CocoaPods version 1.16.2
    
    [✓] Chrome - develop for the web [55ms]
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Connected device (5 available) [11.8s]    
        • iPad (wireless) (mobile) • 00008122-001A08DC22B9801C            • ios            • iOS 27.2 24B5089g
        • iPhone 18 Pro (mobile)   • 9B7D1B19-0DE6-4D84-80D5-6D0EF87EAA90 • ios            •
          com.apple.CoreSimulator.SimRuntime.iOS-27-0 (simulator)
        • iPhone Duo (mobile)      • 08BE5AE2-AF75-4E45-A95A-462788B5E487 • ios            •
          com.apple.CoreSimulator.SimRuntime.iOS-27-1 (simulator)
        • macOS (desktop)          • macos                                • darwin-arm64   • macOS 27.2 26B5086k
          darwin-arm64
        • Chrome (web)             • chrome                               • web-javascript • Google Chrome 154.0.8037.95
    
    [✓] Network resources [848ms]
        • All expected network resources are available.
    
    • No issues found!
    

    Packages : 10cde9a3b14d04f4f8ab8892e1dadcbad885fa48

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 processplatform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamtriaged-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