Inconsistent Gradle warning visibility between Flutter IDE Run and command‑line builds
0 reputation · 03 Dec 2025, 08:33 UTC
0 reputation · 03 Dec 2025, 08:33 UTC
When diagnosing a failed Flutter Android deployment, developers often compare the output from the IDE’s Run button with that from the command line to locate Gradle‑related issues.
Observations show that certain Gradle warnings—such as version‑compatibility notices or unresolved dependency hints—are visible in the verbose CLI logs but disappear from the IDE console, making it harder to spot the root cause without switching to a terminal.
This discrepancy raises questions about how the IDE captures and forwards Gradle’s stderr/stdout streams and whether any filtering occurs intentionally or as a side effect of the launch configuration.
What specific Gradle messages are suppressed in the IDE Run console?
Is the suppression configurable through Flutter or IDE settings?
How can developers ensure consistent visibility of warnings across both execution paths?
The discrepancy in warning visibility occurs because the IDE Run button and the command-line interface (CLI) use different mechanisms to execute and capture Gradle output. When you run a build from the CLI, you are interacting directly with the Gradle wrapper, which streams stdout and stderr to your terminal. In contrast, IDEs like Android Studio and IntelliJ use the Gradle Tooling API.
The Tooling API captures build output as a structured event stream rather than a raw text stream. By default, the IDE filters this stream to prioritize task execution summaries and critical errors, often suppressing LIFECYCLE and INFO level messages. This includes deprecated API notices, version-compatibility warnings, and dependency resolution hints.
| Feature | CLI Behavior | IDE Run Console Behavior |
|---|---|---|
| Output Stream | Raw stdout/stderr | Filtered Tooling API events |
| Warning Mode | Honors --warning-mode |
Often ignores CLI flags; uses internal filters |
| Log Level | Controlled by Gradle flags | Filtered by IDE's console settings |
To align the IDE output with the CLI, use the following methods depending on your environment:
If you are using the IDE's Run configuration, add the --verbose flag to the Additional run args field. This forces the Flutter tool to pass --info to Gradle, surfacing most suppressed warnings in the console.
To make warnings persistent regardless of the caller, add the following to your android/gradle.properties file:
org.gradle.logging.level=WARN
org.gradle.warning.mode=all
To verify that the IDE is actually receiving the warnings (even if it isn't showing them), you can inspect the Gradle daemon log directly while the IDE build is running:
tail -f ~/.gradle/daemon/*/daemon-*.out
If the warnings appear in the daemon log but not in the IDE console, the issue is confirmed as IDE-level filtering.
Diagnostic Detail Needed: Which IDE and version are you using (e.g., Android Studio Hedgehog, VS Code)? Filtering behavior differs significantly between the IntelliJ-based Tooling API and the VS Code Flutter extension's process forwarding.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.