How do i checkout an android project from an SVN repository
Asked Answered
X

6

2

I have an android project and I have added it to an SVN repository. These are the directories/files I have added

Directories : res, src, lib,

Files : AndroidManiFest.xml, project.properties, proguard.cfg, and 2 launch files

However, when i do the following, I'm not able to create the file as an android project

  1. Import project by checking out from SVN (this is a project A)
  2. Using the create new project in eclipse to create the new project - steps are : Create New Projects -> Android Project from Existing Source Code

Are thee some files that I have not committed or am I doing something wrong when I'm creating the new project?

Xanthene answered 4/7, 2012 at 9:25 Comment(3)
Clarify "create a new android project from existing source code". Are you copying the source files? Or are you copying the repository? Or do you create a new repository for the new project? Or do you change the existing files in the existing repository?Euphoria
i have clarified .. pls ask if more is neededXanthene
possible duplicate of Android+Eclipse project sharing via SVN?Negrito
F
16

I spent a lot of time trying to import an Android project from a web based SVN provider into Eclipse (Juno).

Seeing how hard it was for me to find out the correct steps, I leave here my suggestion with screenshots. Enjoy!

  • You must have SVN already installed and configured. No previous project is needed in Eclipse You must have SVN already installed and configured. No previous project is needed in Eclipse

  • I already had the connection to the provider correctly configured due to previous attempts. YMYV here. I already had the connection to the provider correctly configured due to previous attempts. YMYV here.

  • I use SVNKit 1.7 because it will work just fine over a proxy here at work. I use SVNKit 1.7 because it will work just fine over a proxy here at work.

  • Here is the most important step: make sure the Find projects in the children option is selected Here is the most important step: make sure the Find projects in the children option is selected.

  • Choose Checkout as a project Choose checkout as a project

  • Choose whatever workspace you need Choose whatever workspace you need

  • And voilá, the project is ready to roll! And *voilá*, the project is ready to roll!

I added descriptions into the images, for your viewing pleasure. Hope it saves someone a lot of time as it did to me after figuring out the correct steps.

Falstaffian answered 9/4, 2013 at 18:3 Comment(4)
I follow this steps but I receive this message: There are no projects found. In SVN I ignore the folder bin, gen and the file .setting .project .classpath how explain in this tutorial mokasocial.com/2010/11/ignoring-android-files-with-subversionClarisaclarise
Then probably 1) the project you have in SVN wasn't an Eclipse project in the first place or 2) The path you provided to Eclipse in Sshot #2 is not the correct one.Falstaffian
How i configure server side.?Muleteer
As I stated, "I already had the connection to the provider correctly configured due to previous attempts", so I think you're better off creating a new Question. I should need to provide to Eclipse a pasted URL from the web provider, or figure out the url if the server is local.Falstaffian
W
3

In Eclipse try:

Right click in project view.

-> Import

-> Enter Android

-> Select "Existing Android Code Into Workspace"

-> Select your checked out svn folder.

finish. :)

Wildwood answered 4/7, 2012 at 9:30 Comment(1)
what you have said is correct .. i had to checkout the project outside of eclipse (i.e. using the command svn checkout in my terminal - ubuntu) to get it working.Xanthene
D
1

The easiest way to checkout an Android Project with Eclipse is the use the plugin "Subclipse" (http://subclipse.tigris.org). With this plugin, directly on Eclipse you can checkout "as android project"

Darnall answered 4/7, 2012 at 10:8 Comment(3)
this question has nothing to do with which SVN client i should use - infact in the question itself i've mentioned that i'm using eclipse to checkout my projectXanthene
I am trying out this now. But this seems to be exactly what I am looking for. Question Asker seems clueless...Rossierossing
@ArvindSridharan, this answer is not about the client. This plugin performs a client action as well as dealing with the necessary android specific folder requirementsAbeu
L
1

I'm not sure why, but I'm missing the "Find projects in the children" option. I'm using Eclipse Kepler Service Release 2 with the latest Subclipse as of this writing. Here is the workaround. This method also preserves the ability to commit your changes, unlike some instructions I found on this site.

  1. Create a temp directory under your default workspace directory (may not necessarily need to be under workspace, but it works)
  2. Import your project from SVN into the temp directory through Eclipse
  3. Delete the project, don't check "Delete files"
  4. Import Android project from existing code, choose your imported project in the temp directory
  5. Refactor - > Move, check "Use default location". This moves the project from the temp directory to your regular workspace, i.e. one level up.
Lollipop answered 14/5, 2014 at 0:26 Comment(1)
Works! See my answer. I improved your workflow like this: I did not checkout into a temp directory and had not to move it back. Moving caused problems with libraries.Thralldom
T
1

Despite of biggvsdiccvs I skipped using a temp directory which helped to avoid problems with referenced libs like the android support library.

  1. Install Subclipse and SVNKit (video tutorial 0:12)
  2. Switch to SVN perspective and add your repository (video tutorial 1:12)
  3. Switch back to Java perspective and Choose "File > Import > SVN > Checkout Projects from SVN" using your freshly installed SVN Eclipse plugin or follow video tutorial 1:42
  4. Select your repo
  5. Choose "Checkout as project with the name specified"
  6. Choose "Checkout as projects into Workspace"
  7. Enable "Use default workspace location"
  8. Delete the project, don't check "Delete files"
  9. Import Android project from existing code, choose your imported project
Thralldom answered 13/11, 2014 at 15:13 Comment(1)
Now switched to Subversive. The workflow is pretty much the same. The key is to convert the project into an android project by deleting the checked out project and importing it as Android project.Thralldom
G
-1

Use TortoiseSVN. You can also use it for Git.To properly upload and download your files from SVN. Maybe your SVN client not working correctly.

Grendel answered 4/7, 2012 at 11:48 Comment(1)
this question has nothing to do with which SVN client i should use.Xanthene

© 2022 - 2024 — McMap. All rights reserved.