How to export an Android Studio project and move it to another computer - Main image

Intermediate

How to export an Android Studio project and move it to another computer

We explain how to export an Android Studio project and move it to another computer. Instructions for beginners or anybody who started with Android Studio.

Miha Cirman - CodeBrainer
Miha Cirman
6 min read

How to export an Android Studio project? We get asked about this a lot from our students at CodeBrainer. Students want to move Android Studio projects from one computer to another. They are constantly showing their projects and asking how they can improve their project even further, and for that, they need to move it to a different computer or send it to a colleague. However, you have to know How to export an Android Studio project in the right way. 

Projects do not work on all computers. If you do not move a project the right way, it might not work on a target computer. That’s why we decided to write a short step by step guide on how to do it. Projects do not work on all computers. If you do not move a project the right way, it might not work on a target computer. Consequently, that’s why we decided to write a short step by step guide on how to do it.

Learn about exporting an Android Studio project:

  • How to use a tool: Export to Zip File…
  • Manually export Android Studio project
  • How to locate the project folder
  • How to clean the folder for shorter export size
  • Create a zip or a package

 

If you are starting and don’t even have Android Studio, you can download it for free. All in all, exporting a project is a good way to start for beginners if you ask your friend to share a project with you. This way, you see how to start and how the code looks. For others, this is a way to share your knowledge.

 

Programming is a skill best acquired by practice and example rather than from books. Have a look at our Android Development course and get the skills you need.

Start Now

 

Solution: Export to Zip File… (The new way of exporting Android Studio project)

Export to Zip File… is a new tool available for us in Android Studio 3.0 onwards. You can use it via menu: File | Export to Zip File…

Here is an example of how you can export an Android Project for our Love Calculator from a blog post on how to make an android app

First, choose Export to Zip File... from the file menu:

Export an Android Project - Export to Zip

Next, choose the destination and file name:

Export an Android Project - Choose destination

 

All that is left for you to do is to share your zip file.

 

Manually export an Android Studio project

We can now say that manually exporting a project is the old way to export our projects. In fact, manual export was the only way in older versions of Android Studio (before 3.0) since there was no tool in Android Studio. We have prepared a Windows and Mac version for you to understand the logic behind it better.

 

How to export an Android Studio project and make a zip file on Windows

 

Locate the Android Studio project folder on Windows

Views are a little bit different on Windows and Mac, this is why we have both screenshots for you. These steps are for Windows

In Project Tool Window, you usually have two ways, according to the view mode you have selected. If you are in the Project View, the app name is the first item in the list. In Android view “app” is the first item. See the both options below:

  1. Project View
    Project View
  2. Android View (the preferred view)
    Android View

 

Right click on the application name or “app” to find a folder with all the files from your project.

Show in Explorer

 

In Windows, you have the option “Show in Explorer” (in MacOS it’s “Reveal in Finder”). 

Programming is a skill best acquired by practice and example rather than from books. Have a look at our Android Development course and get the skills you need.

Start Now

 

How to make a zip file (of an Android Studio project) in Windows

Once Android Studio selects the folder for you, it opens an Explorer, and selects a folder within your project folder. To create a zip you have to Right click it and select: “Send To/Compressed (zipped) folder”.

Export an Android Project - Send to compressed

 

With that, you get a “.zip” file that you can take with you, send over mail, share… You can also use GDriver, DropBox, OneDrive or some other kind of Cloud drive).

 

How to export an Android Studio project and make zip on Mac

In the Project Tool Window, you usually have two ways, according to the view mode you have selected. If you are in the Project View, app name is the first item in the list. In Android view “app” is the first item. See the both options below:

  1. Project View
    Export an Android Project - Zip in MacOS

  2. Android View (the prefered view)
    Zip in MacOS - Project View

 

Right click on application name or “app” to find a folder with all the files from your project. Use Reveal in Finder from the context menu (right click on app folder)
Zip in MacOS - Reveal in finder

 

Once Android Studio locates files and opens up finder for you, choose Compress “...” option from Context menu. It creates a zip file for you.

Zip in MacOS - Compress

 

Clean the folder to reduce the size of the export project

For more advanced users you can also clean up your zip file to reduce its length. In the first place, you remove “build” folders. The first one is in the main folder and the second one in the “app” folder. In addition, you can also remove .iml files (these files are computer associated with relative paths and are created on other computers automatically).

Main folder files you can delete:

 Reduce size

 

App folder files you can delete:

App folder files 

For simple projects you reduce project zip size quite a bit, for our example: 5.2MB -> 0.4MB

 

Conclusion

Knowing how to export an Android Studio project is excellent when you need to move files and code to another computer over mail or sharing it in any other way. Moreover, sharing projects like this can be a perfect way of collaboration for beginners. Equally important, when working on a larger project there is a better way of sharing projects, you mostly use version control systems like GIT (preferably on a cloud solution like BitBucket, GitHub,... or local if needed; plain Git or something like GitLab).

In conclusion, exporting a project and using GIT is one of the skills you need to become an Android Developer, read more in our blog post about all the skills needed to be an Android Developer.

Have fun, coding with CodeBrainer.

 

 

Loading FB comments...