Repository navigation
Android examples fail to compile with latest Android Studio RC/JDK due to BuildConfig.java warning treated as error (-Werror) #190069
Description
Steps to reproduce
- Use the latest Flutter stable channel.
- Update the packages repository to the latest revision.
- Use the latest Android Studio RC.
- 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
jesswrd commentedon Jul 28, 2026
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.
[various] Allow plugin example apps to build and test on JDK 25 (flut…
preethi0228-git commentedon Oct 5, 2026
Verified these tests in the latest Stable channel (3.47.6) and they are passing now.
Tests :
Flutter doctor output
Packages : 10cde9a3b14d04f4f8ab8892e1dadcbad885fa48