Flutter flutter/CMakeLists.txt "#" This character is not allowed
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
Rupam
Updated on December 27, 2022Comments
-
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 about 3 yearsFrom which repo have you downloaded the sources of flutter?
-
Rupam about 3 yearsFlutter dev repo
-
Tsyvarev about 3 yearsDo 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 about 3 yearsLaunching 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ểơửṩ about 2 yearsYour directory's full path might contain a "#" which is discouraged.
-