Import Android Test Project into Eclipse from Version Control

Viewed 3260

I have an Android Eclipse project and an associated Android Test Eclipse project checked into a subversion repository. Given a checked out working copy, how do I bring the Android Test project into an Eclipse workspace?

It's easy to add the Android project to the workspace (just File->New Project->Android Project->From Existing Source and point it at the directory in the svn working copy). But, the 'New Android Test Project' does not have an option to create from existing source.

4 Answers

Was searching for this functionality and didn't find it either :)

What I did in the end is this:

  1. Moved my existing test project directory (checked out from version control) to a temp dir
  2. In Eclipse I created a new empty Android Unit Test project, located it in the directory with the name of the original test project directory
  3. Closed Eclipse and copied a .classpath and .project files from newly created test project to a current root directory of old test project (in a temp dir)
  4. Removed a new empty test project directory, moved old one from temp location back to original location

Simply put, I just generated new .classpath and .project files and copied them to checked out project dir.

After cleaning and refreshing in Eclipse this worked out :) Of course this is not a real solution, but an ugly workaround which I even don't expect to work in any situation, but who knows, might help you. Cheers.

Related