Android+Eclipse project sharing via SVN?
Asked Answered
O

1

6

I am very new to Eclipse (Galileo, Eclipse IDE for Java Developers) and working on my first Android app, but have used SVN on many other kinds of projects and development. Last night I took my first crack at pushing the new source into a shared repository (at work) and then pulling it back down at home.

Based on an SO question/answer, I had ignored the bin and gen folders, but added everything else. When I got home, I had hoped it would be as easy as pointing eclipse to the newly downloaded source tree.

I tried setting the workspace (requested when eclipse started) to the precise folder holding all source. Nothing showed up. It was as if I were starting fresh regardless of all the source and files sitting in the workspace folder.

Then I thought maybe I needed to open a "project" file to get things rolling. Opening the .project file yielded the contents of that file in the XML editor of eclipse.

What am I missing here? Is the project metadata not stored in the source tree? Do I have to build project metadata up on every machine that gets a working copy of the source? Is this something wrong with my home Eclipse install? Can someone give me an overview of how they (successfully) do this?

Optional answered 2/7, 2010 at 15:10 Comment(1)
#11326689 has a richer discussion about the same issueRiella
S
7

You should be able to do it like you tried. Make sure you have the Android Development Tools (android eclipse plugin) installed along with the android SDK and make sure you set up ADT before you open the project.

Not checking in the bin directory makes sense to me, but I do check in the gen folder and don't have any problems.

Here is what I do to open a project from SVN if the source is already on the machine:

  1. Open eclipse
  2. Click on File->Import
  3. Select General->Existing Projects into Workspace

Or you can also do this:

  1. Open Eclipse
  2. File -> Import
  3. Select SVN -> Checkout Projects from SVN
  4. Follow the steps to get from SVN
Socinus answered 2/7, 2010 at 15:22 Comment(5)
I will give this a try tonight. I hadn't tried to "import" an "existing project", just "open" a "project" file. Yay for semantics variations!Optional
Yeah I had a lot of trouble doing this, but once I got it working, I documented my steps and it sort of just works. Importing from SVN is key. If asked to delete existing workspace files, Delete them manually, in my notes I have several occasions of it failing otherwise.Illailladvised
This gave me the minor clues i needed: A "Workspace" is just a folder that holds project metadata files, and importing an existing project into the workspace is just including the project location and settings in that metadata. Thanks. I am back up and running.Optional
@Ryan Conrad, will that only import the source files and nothing of the .metadata etc that can create dependency errors on machines configured differently? If the directory was the product of an export from a Windows machine and you want to do the import on a linux machine will the source files only be imported since other files create path errors etc.Candlepin
Try my findings here: #11326689Speedball

© 2022 - 2024 — McMap. All rights reserved.