开发者

Work on an Android program with several computers

I am developing a project from work, but would like to be able to take the project home and continue it. I can't just "open" a project, so 开发者_StackOverflow中文版what are the settings to save it on one computer, then open it from home, then save it again to work on it from home?


I use Dropbox. My Eclipse workspace is inside my Dropbox folder, so whenever I load up Eclipse on any of my computers, I always have the most updated versions of my files without any hassle.

This also gives you the added benefit of not having to worry about a harddisk failure and being able to rollback files.


Either do as Glendon said or setup a subversion or git repository. I usually do both.


If you're not using Dropbox or github, I assume you're emailing the code or using a USB drive. After you've unzipped your project to your other computer's home directory, run Eclipse and do

File, New, Android Project enter the Project Name in Contents, select Create project from existing source in Location, browse to the directory you just created in your home directory choose a Build Target and click Finish assuming the other settings have been filled in for you.


I do the same thing by putting a bare git repository on a memory stick and cloning it onto all development machines.

As the repositories on the development machines are cloned from the one on the stick, their "origin" will point back to the memory stick. So all I have to do when bouncing from one development machine to the other is

<insert memory stick>
cd <work_directory_on_harddisk>
git pull
...write code
git push
<remove memory stick>

and I am done.

What is nice about this is that even if you forget the stick, or forget to synchronize and end up working on an outdated directory, you can untangle it easily with all the power of git.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜