I have to take backup of Android project. But the entire folder structure size is very big (goes upto few hundreds of MBs) for periodical backups. Basically I want to take backup of only source and configuration files (so that I should be able to build project successfully just with backup). I don't care generated and intermediate files.
But when I've look at folder structure, it looks too confusing and cannot make which folders/files I should backup and which should discard (Yes, I can find out my own written source files, but which are config and other files needed by Android Studio?)
Can someone please guide?
Thanks!
Right-click on the Backup & Sync icon on the bottom right of the system taskbar, click 3 dots and then select the Preferences option. Now, add another folder for the backup process by clicking on the CHOOSE FOLDER option. Browse and select the folder to backup. Then click Select Folder to add it to the application.
The resource folder is the most important folder because it contains all the non-code sources like images, XML layouts, and UI strings for our android application.
Storage of the Android project. Android Studio stores the projects by default in the home folder of the user under AndroidStudioProjects. The main directory contains configuration files for Android Studio and the Gradle build files.
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
folderNote: Clean Project
sometimes does not remove generated files.
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