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

Viewed 580

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)

1 Answers

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

Related