Skip to content

When setting flutter config --build-dir=<out>, the default build folder is still created. #102924

Closed

Description

@jfcarroll-triplecrown

Steps to Reproduce

  1. Run flutter config --build-dir= in VSCode terminal
  2. Restart VSCode
  3. Run flutter create .
  4. The new build-dir is created and populated, but the original default build folder is also created and populated with stuff.
  5. This creates a conflict as there is already file named BUILD in the flutter project's root, where it creates the build folder.

Logs

Logs

There are no logs for this, the problem is obvious, and is solved if I remove the BUILD file, by I can't do that as this file is required by the CI/CD system.

PS C:\Users\jfcarroll\source\repos\google73\google3\location\nearby\apps\helloconnections> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.19042.1645], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Professional 2022 17.1.6)
[√] Android Studio (version 4.1)
[√] VS Code (version 1.66.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

• No issues found!

Activity

  1. danagbemava-nc commented on Sep 23, 2022

    @danagbemava-nc
    Member

    Reproducible using the steps provided above.

    NB: You may need to run flutter build so the build folders are generated.
    In the screenshot below, you can see there's a next folder that contains some windows files as well as a build folder that also contains some windows file.

    The next folder was set as the build-dir

    screenshot

    23 09 2022_18 45 44_REC

    flutter doctor -v
    [√] Flutter (Channel stable, 3.3.2, on Microsoft Windows [Version 10.0.19043.1889], locale en-GH)
        • Flutter version 3.3.2 on channel stable at c:\src\sdks\stable\flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision e3c29ec00c (9 days ago), 2022-09-14 08:46:55 -0500
        • Engine revision a4ff2c53d8
        • Dart version 2.18.1
        • DevTools version 2.15.0
    
    [√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
        • Android SDK at C:\Users\Deana\AppData\Local\Android\sdk
        • Platform android-32, build-tools 32.1.0-rc1
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.3)
        • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
        • Visual Studio Community 2022 version 17.2.32526.322
        • Windows 10 SDK version 10.0.22000.0
    
    [√] Android Studio (version 2021.2)
        • Android Studio at C:\Program Files\Android\Android Studio
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    
    [√] IntelliJ IDEA Community Edition (version 2022.1)
        • IntelliJ at C:\Users\Deana\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\221.5921.22
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
    
    [√] IntelliJ IDEA Ultimate Edition (version 2022.1)
        • IntelliJ at C:\Users\Deana\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\221.5921.22
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
    
    [√] VS Code (version 1.71.2)
        • VS Code at C:\Users\Deana\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.48.0
    
    [√] Connected device (4 available)
        • M2007J20CG (mobile) • 5dd3be00 • android-arm64  • Android 12 (API 31)
        • Windows (desktop)   • windows  • windows-x64    • Microsoft Windows [Version 10.0.19043.1889]
        • Chrome (web)        • chrome   • web-javascript • Google Chrome 105.0.5195.127
        • Edge (web)          • edge     • web-javascript • Microsoft Edge 105.0.1343.42
    
    [√] HTTP Host Availability
        • All required HTTP hosts are available
    
    • No issues found!
    
    [√] Flutter (Channel master, 3.4.0-29.0.pre.87, on Microsoft Windows [Version 10.0.19043.1889], locale en-GH)
        • Flutter version 3.4.0-29.0.pre.87 on channel master at c:\src\sdks\master\flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision b2ccdb214d (2 days ago), 2022-09-21 23:31:23 -0400
        • Engine revision 1d5013e343
        • Dart version 2.19.0 (build 2.19.0-227.0.dev)
        • DevTools version 2.17.0
    
    [√] Windows Version (Installed version of Windows is version 10 or higher)
    
    [√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
        • Android SDK at C:\Users\Deana\AppData\Local\Android\sdk
        • Platform android-32, build-tools 32.1.0-rc1
        • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
        • All Android licenses accepted.
    
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.3)
        • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
        • Visual Studio Community 2022 version 17.2.32526.322
        • Windows 10 SDK version 10.0.22000.0
    
    [√] Android Studio (version 2021.2)
        • Android Studio at C:\Program Files\Android\Android Studio
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    
    [√] IntelliJ IDEA Community Edition (version 2022.1)
        • IntelliJ at C:\Users\Deana\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\221.5921.22
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
    
    [√] IntelliJ IDEA Ultimate Edition (version 2022.1)
        • IntelliJ at C:\Users\Deana\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\221.5921.22
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
    
    [√] VS Code (version 1.71.2)
        • VS Code at C:\Users\Deana\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.48.0
    
    [√] Connected device (4 available)
        • M2007J20CG (mobile) • 5dd3be00 • android-arm64  • Android 12 (API 31)
        • Windows (desktop)   • windows  • windows-x64    • Microsoft Windows [Version 10.0.19043.1889]
        • Chrome (web)        • chrome   • web-javascript • Google Chrome 105.0.5195.127
        • Edge (web)          • edge     • web-javascript • Microsoft Edge 105.0.1343.42
    
    [√] HTTP Host Availability
        • All required HTTP hosts are available
    
    • No issues found!
    

    build_windows.log

  2. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    a: buildBuilding flutter applications with the tool
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    on Sep 23, 2022
  3. added
    P2Important issues not at the top of the work list
    on Sep 27, 2022
  4. Moini commented on Nov 18, 2024

    @Moini

    New to Flutter and Dart, and really wondering.

    Does this mean that everyone who uses Flutter with VSCode(ium) cannot put the build results into a separate folder but must keep them cluttering the main project folder? Or is there a way to fix/workaround this?

  5. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    on Jul 11, 2025
  6. added a commit that references this issue on Aug 28, 2026
    48a031b
  7. github-actions commented on Sep 11, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Sep 11, 2026
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 lista: buildBuilding flutter applications with the toolcustomer: googleVarious Google teamsfound in release: 3.3Found to occur in 3.3found in release: 3.4Found to occur in 3.4has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions