How to clear Flutter's Build cache?

后端 未结 8 1796
耶瑟儿~
耶瑟儿~ 2020-12-09 07:50

There seems to be a problem with flutter\'s build.

I always need to perform RUN > Flutter Full Restart everytime I run the app to a

8条回答
  •  执笔经年
    2020-12-09 08:07

    Build cache is generated on application run time when a temporary file automatically generated in dart-tools folder, android folder and iOS folder. Clear command will delete the build tools and dart directories in flutter project so when we re-compile the project it will start from beginning. This command is mostly used when our project is showing debug error or running related error. In this answer we would Clear Build Cache in Flutter Android iOS App and Rebuild Project structure again.

    1. Open your flutter project folder in Command Prompt or Terminal. and type flutter clean command and press enter.

    2. After executing flutter clean command we would see that it will delete the dart-tools folder, android folder and iOS folder in our application with debug file. This might take some time depending upon your system speed to clean the project.

    For more info, see https://flutter-examples.com/clear-build-cache-in-flutter-app/

提交回复
热议问题