I am new in Android Studio so I face some problem with it. I am looking for a way how to project clean.
In Eclipse I would do Project -> Clean -> OK
but I don't know how it is done with Android Studio.
After inspection of code, Android Studio will remove such code from your files that is not necessary. It is called cleaning up code. There are many plugins available for it. As Android Studio support by default, You can format and clean your code using this feature.
In the Android Studio welcome screen, click on the project name and select Remove From List. Select File > Open Recent > Manage Projects, select the project, and press the delete key or click the X that's displayed on it.
It removes whatever already-compiled files are in your project so that you can do a complete fresh rebuild.
To run a Gradle command, open a command window on the project folder and enter the Gradle command. Gradle commands look like this: On Windows: gradlew <task1> <task2> … e.g. gradlew clean allTests.
You can clean your project doing this
Build > Clean Project
or Build > Rebuild Project
Also you can do the gradlew clean
As @Kellogs commented :
Manually delete the [project]/.gradle
as hidden folder
as that one is the main culprit for large cleaned projects sizes.
Cleaning an android project is quite simple just follow these steps
1. Click on Gradle pane,found in the top-right corner of Android Studio 2. Click on your project,then Tasks -> build ->clean
Step 1
Step 2
Note Never clean your project using the Build -> Clean Project.Instead of cleaning your project it will increase the size of it.
Update clean
has been replaced by cleanBuildCache
in the recent versions of Android Studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With