Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to project clean in Android Studio?

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.

like image 456
Mansukh Ahir Avatar asked Feb 18 '15 10:02

Mansukh Ahir


People also ask

What is code cleanup in 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.

How do I completely delete a project in Android Studio?

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.

What does project Clean do in Eclipse?

It removes whatever already-compiled files are in your project so that you can do a complete fresh rebuild.

How do I run Gradlew clean?

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.


2 Answers

You can clean your project doing this

Build > Clean Project or Build > Rebuild Project

Also you can do the gradlew clean

enter image description here

As @Kellogs commented :

Manually delete the [project]/.gradle as hidden folder as that one is the main culprit for large cleaned projects sizes.

like image 120
Skizo-ozᴉʞS Avatar answered Oct 06 '22 15:10

Skizo-ozᴉʞS


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

enter image description here

Step 2

enter image description here

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.

like image 31
Surbhit Rao Avatar answered Oct 06 '22 17:10

Surbhit Rao