Android Studio: Need to know which folders/files to backup

Actually, it is very simple in the android studio. Only you have to do is just

File ->Export to Zip File This will create a zip file of your project. This Zip file will only contain the files that are necessary, to import the project back into Android studio again.

Edit: From the new Android Studio Version Export to Zip flow changed(My Version: Android studio 4.1, Running in Mac Os Catalina). Now it is File->Manage IDE Settings ->Export to Zip FIle.


You backup whatever is important. For each project or library, do backup these:

  1. src folder (contains source code, resource files)
  2. build.gradle file (contains info about dependencies, libs)

Do not need to backup:

  1. build folder
  2. gen folder
  3. .gradle folder

Note: Clean Project sometimes does not remove generated files.