Flutter flutter/CMakeLists.txt "#" This character is not allowed

527

As pointed out in comments by @Ṃųỻịgǻňạcểơửṩ, make sure that there's no # character in any of the directories in your path to where the Flutter project is located. For example if you have path like this;

C:\\projects\ui#\your_project

then you will get the error like the one you described. In this case you have to change the name of the direcory ui# to something that does not contain the # character, e.g., ui, so that the path become

C:\\projects\ui\your_project

Share:
527
Rupam
Author by

Rupam

Updated on December 27, 2022

Comments

  • Rupam
    Rupam over 1 year

    CMake Error at flutter/CMakeLists.txt:85 (add_custom_command): add_custom_command called with OUTPUT containing a "#". This character is not allowed.

    Launching lib\main.dart on Windows in debug mode... lib\main.dart:1 CMake Error at flutter/CMakeLists.txt:85 (add_custom_command): add_custom_command called with OUTPUT containing a "#". This character is not allowed. Exception: Unable to generate build files Exited (sigterm)

    • Tsyvarev
      Tsyvarev about 3 years
      From which repo have you downloaded the sources of flutter?
    • Rupam
      Rupam about 3 years
      Flutter dev repo
    • Tsyvarev
      Tsyvarev about 3 years
      Do you mean github.com/flutter/flutter? But it doesn't contain CMakeLists.txt. Please, describe (in the question post) exact steps which cause given error.
    • Rupam
      Rupam about 3 years
      Launching lib\main.dart on Windows in debug mode... lib\main.dart:1 CMake Error at flutter/CMakeLists.txt:85 (add_custom_command): add_custom_command called with OUTPUT containing a "#". This character is not allowed. Exception: Unable to generate build files Exited (sigterm)
    • Ṃųỻịgǻňạcểơửṩ
      Ṃųỻịgǻňạcểơửṩ about 2 years
      Your directory's full path might contain a "#" which is discouraged.