You’ve probably noticed that Android Studio doesn’t have a “clean” menu option. But we know that, like any build environment, there are intermediate files created that we may want to occasionally remove.
It turns out the solution is the command line. Simply open a command line in your project’s root folder (Usually named something like MyAppProject) and run the following command
gradlew clean
You’ll see something like this…
Notice that you get a bit of an unexpected message, “BUILD SUCCESSFUL”. This simply indicates that it has gone through and successfully cleaned out the intermediate files. I’ve found that when dealing with larger projects its not uncommon to reduce the amount of disk space used by the project by 70% or more.
So a bit of an unexpected solution (especially for those who’ve been in a Windows environment for a long time) but an easy one.
To learn more about Android programming, checkout Jim’s Android courses on Pluralsight.
Jim’s latest book, “Creating Dynamic UI with Android Fragments” is now available on amazon.
i executed this command in the terminal in android studio, but it started downloading something:
D:\documents\projects\android studio\intentApp>gradlew clean
Downloading https://services.gradle.org/distributions/gradle-2.2.1-all.zip
[…] fadeOutSpeed: 100, predelay: 400, position: "top right", relative: true, offset: [10, 10] });2)How to Clean an Android Studio Project jQuery("#footnote_plugin_tooltip_2").tooltip({ tip: "#footnote_plugin_tooltip_text_2", tipClass: […]