Home > database >  Flutter failed to delete a directory at "build\flutter_assets"
Flutter failed to delete a directory at "build\flutter_assets"

Time:12-19

I'm working on flutter to develop a "map-navigation app". I'm new to it. It showed "some of the dependenciesa are outdated" so I update the packages and pub files, after that the application is not running on any of the platform (i.e. Desktop, Web, android and ios). It shows the following given error.

Also tried manually deleting the build folder from the project and then executing the app, still facing the same error.Manually deleting the build folder, applying "flutter clean" then running the app still shows error

Launching lib\main.dart on Chrome in debug mode... Flutter failed to delete a directory at "build\flutter_assets". The flutter tool cannot access the file or directory. Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user. Waiting for connection from debug service on Chrome...

Flutter failed to delete a directory at "build\flutter_assets"

I want to execute this application on web or android. Want to provide flutter tool the access to file or directory.

CodePudding user response:

The problem is probably because it is not a good idea to have a space in the path to a flutter project ie. 'HP PC' would be better named with an underscore instead of the space character.

The flutter documentation warns you of this here https://docs.flutter.dev/get-started/install/windows

CodePudding user response:

Give it a try it worked for me.

run command in vs code or android studio terminal

flutter clean

flutter pub get

repeat this 5-7 times restart whole project,PC and reinstall the build in your mobile

if you still have any error you poke me out here I will leave my linkedin

  • Related