The Cache is nothing system-generated temporary files in the dart-tools folder, android folder, an iOS folder. Clear Command will delete this temporary file and when the user runs the project these files will be installed automatically into the project. So our today’s topic is how to clear Flutter’s build cache.
How to Clear Flutter’s Build Cache?
To Clear a cache user can try with the things as below:
- Open your flutter project folder in Command Prompt or Terminal. and type flutter clean command and press enter.
- After executing the 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.
The first user can try with Flutter Clean command that will generate a brand new APK and hot reload display only modification. Try running your app using the command line flutter run and then press r or R for respectively hot-reload and full-reload.
If in android studio Tools->Flutter->Clean
- Click the External tool ‘+’ icon under Before launch: External tool, Activate tool window.
- Run External Tool
- Configure it like so. Put the working directory as a directory in your project.
There are basically 3 alternatives to cleaning everything that you could try:
- Flutter clean will delete the /build folder.
- Manually delete the/build folder, which is essentially the same as flutter clean.
- Restart your IDE, as it might be caching some older error logs and locking everything up.
So in this article, We have been through How to Clear Flutter’s Build Cache.
Thanks for being with us on a Flutter Journey !!!
Keep Learning !!! Keep Fluttering !!!
Flutter Agency is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget Guide, Flutter Projects, Code libs and etc.
Flutter Agency is one of the most popular online portals dedicated to Flutter Technology and daily thousands of unique visitors come to this portal to enhance their knowledge of Flutter.