Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a Android Studio project on two computers?

I use two computer for coding. My desktop pc and the notebook. I sync the two computers with dropbox. How can I import/load a project on each of this two computers? The project base folder is different on each computer. When I try to load/import a project which is created on the other computer it loads the project but I got a error with a wrong path.

"Gradle "Test2Project" project refresh failed: Could not fetch model of type "IdeaProject" using Gradle distribution "http://services.gradle.org/distributions/gradle-1.6.zip". Project directory "C:\Users\thomas\AndroidStudioProjects\Test2Project" does not exist."

The wrong pfad is the right pfad on the other computer. How can I import Android Studio projects so that it works even on another computer with a different folder structure?

like image 791
hitzi Avatar asked Jun 27 '13 07:06

hitzi


People also ask

Can I copy Android studio from one PC to another?

Yes. Copying SDK from one PC to another PC works. I copied updated SDK present in PC1 to PC2 and i got all the new features in PC2 also. It works.

How do I export and import an android studio project?

Then take the folder (in the workspace folder) of the project and copy it to a flash memory or whatever. Then when you get comfortable at home, copy this folder in the workspace folder you've already created, open the Android Studio and go to File then Open and import this project into your workspace.

How do I copy one Android project to another?

Select your project then go to Refactor -> Copy... . Android Studio will ask you the new name and where you want to copy the project. Provide the same. After the copying is done, open your new project in Android Studio.


2 Answers

Like the others i agree, that using a VCS would be the best solution. Even though you can try to filter all android studio related files (like *.iml, .idea folder and local.properties). I don't know if you can do this with dropbox or if you need some kind of 3rd software.

After that you should be able to make source code changes on both computers without greater problems. (You may have to declare project dependencies changes for the android studio twice) Builds depending on the build.gradle files should work to. But again: using a VCS is the better way to go.

like image 68
rivare Avatar answered Nov 15 '22 22:11

rivare


Go for git, you can use bitbucket.com as a free remote repository.

like image 44
rafaello Avatar answered Nov 15 '22 22:11

rafaello