How To Reduce Android Studio Project Size 100% Safe Method

We all know that android development is getting famous day by day, and we also some time need to do work on huge projects and sometimes we also need to transfer our project code from one PC to another PC or need to keep backup for later use. But when we compile the code in android studio and run it in an Emulator then project size suddenly increase from KBs to MBs due to debugging and when need to keep backup we also have to keep all the project code with needless files and folders.

Many people don’t know that how to delete decrease project size by deleting unnecessary files and folder but if we delete any necessary file or folder from the project then it can corrupt our project, and then we are unable to run our project again.

Today I’m going to tell you that how we can delete all unnecessary files and folders within a minute without any hard work or time waste we can reduce the size of our project.

Methods of Reduce Android Studio Project

There are two types of methods to reduce size.

  • Reduce Size Manually
  • Reduce with Command

Method 1 Reduce Size Manually

By this method we can delete all unnecessary files and folders manually by following simple steps given below;

1: Go to your project location and then goto app/build location, in my case it is D:/Android/InfopalacessMobileApp/app/build and find then intermediates folder.

2: Now Simply delete intermediates folder. That’s it We have done . Now you can check the size of your project it will be decreased.

Method 2 Reduce Size with Command

We can also decrease our Project Size with command. To decrease size of project with command just follow these simple steps; 1: Go to View > Tool Windows > Terminal or Simple Press ALT + F12. A terminal window will appear within android studio usually i opens at the bottom of android studio screen.

image

2: Now type gradlew clean command and press Enter Key .
That it is will delete all unnecessary files and folders automatically and your project size will be reduced.

Source: infopalacess

Happy learning!

8 Likes