3

I want to migrate an Android project developed in Android Studio from one machine to another machine so I can continue working.

I tried to copy the project directory to the target machine; but, when opening the project in Android Studio (FileOpen) on the target machine, it doesn't load it as an Android project, instead it considers it to be just a directory.

How can I migrate a project to another machine?

4
  • 2
    It's a good time to start thinking about using version control. There are free options out there. If your project only lives on your computer, you will lose it eventually.
    – 323go
    Jan 12, 2016 at 13:56
  • save your code onto github.com, or dropbox then retrieve from same on other box Jan 12, 2016 at 17:56
  • If reopened, would be a duplicate of this question
    – Alfabravo
    Jan 13, 2016 at 7:47
  • @MsYvette Indeed. I checked age and the other having an accepted answer already. But yes, those criteria are totally valid.
    – Alfabravo
    Jan 14, 2016 at 14:24

3 Answers 3

4

So how this can be done?

Copy the project directory.

I usually clean out the bits that wouldn't go into version control (e.g., build/, *.iml, .gradle/, .idea/) before importing the copied directory into Android Studio.

1

When opening the project in the new machine in android studio for the first click on the folder directory and android studio will automatically sync the files and set up the new project.
Select app to include in project.
Next time when you click to open the project it will appear as a project and not a directory.

enter image description here
enter image description here
enter image description here
enter image description here

In addition to Commonwares answer.

I keep all my projects either in a google drive directory, both locally on my machine and online or on github usually both locally, but always remotely. Anything that requires version control is on github.

That way if anything happens to a machine (which has happened in the past) all the projects are accessible to me.

If I need to use another machine I can download the complete project.

The other way is to copy the project to a removeble drive or usb stick and upload it to your other machine.

0

Usually this problem occurs, only when you try to load the project for first time. Instead of an android project, it considers to be just a directory.

enter image description here

However, I found a way around, which can fix this issue.

  1. Copy the project directory to target Machine.

  2. From Android Studio, go to File->Open; Browse the project directory.

  3. Expand the project directory and open build.gradle. It will complete the required set up automatically and load the project.

enter image description here

  1. Next time, when you will open the project, it will consider it an Android Project.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.