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:
src
folder (contains source code, resource files)build.gradle
file (contains info about dependencies, libs)
Do not need to backup:
build
foldergen
folder.gradle
folder
Note: Clean Project
sometimes does not remove generated files.