This happened to me when trying to compile/run a Flutter application on Windows. It’s quite an irritating bug and searching online found a 3-year old StackOverflow question about it.
There were several possible reasons for it.
- Files were protected. (i.e. needed unblocking).
- File path contained foreign characters.
I tried looking for these with no success. However I did find a font file that I’d added in the pubspec.yaml that had a | in the middle of the name. D’oh!
I followed it up with these commands in a terminal
flutter clean
flutter pub <span class="hljs-keyword">get</span>
And it worked.
(Visited 1 times, 1 visits today)