Migrating SVN to Android Studio

I am transferring my Android project from Eclipse to Android Studio. I use Subversion and wonder how I can transfer my SVN to the new file structure used in Android Studio without losing my story.

Thanks for any help!

+7
android eclipse android-studio svn gradle
source share
2 answers

I do not know the differences between the two file structures. But he would try like this:

  • Check your project (it might be better to use a client like TortoiseSVN).
  • Create a new file structure (new folders)
  • Fix
  • Move files from the old structure to the new
  • Commit (check the commit dialog if there are only move actions!)
  • Delete old folders that you no longer need
  • Fix

SVN recognizes these move operations. You will see if it works using the operations in the commit dialog. If there is a β€œdelete” / β€œnew” action, something went wrong, only the β€œmove” actions should act.

+3
source share

Posting this because it can help someone else.

I ran into the same problem. @ user714965 was inspiring, but did not solve my problem, because I could not figure out how to get SVN after learning that I had moved the file from the source folder to a new structure in my working copy.

To do this, you will need TortoiseSVN or a similar SVN GUI client.

Here is what I did:

  • Patch the latest changes to the Eclipse project to the SVN repository.
  • Open Android Studio and use this to import a working copy of the Eclipse project.
  • Android Studio perfectly transforms an Eclipse project into an Android Studio / Gradle project. Let me name this project "PrjGradle".
  • Open the converted Gradle project folder window and save it on one side of the screen.
  • Go to the SVN repository where you have the project (using TortoiseSVN).
  • Back up the current branch to a branch or tag and name it final_eclipse or something else.
  • Now mirror the folder structure of the recently converted Gradle project on your local computer directly in the TortoiseSVN Repo Browser browser window. Meaning, see how the directory is structured in "PrkGradle" and creates / deletes / renames folders directly in the trunk repository. It will be painstakingly tiring, but you have to carry it if you want to keep your SVN history.
  • When you move files around (not copied) directly to the repo, the file history remains unchanged.
  • After completion, review the restructured directory on the local computer. Let me call it "NewPrj".
  • Use a suitable folder comparison program (e.g. Beyond Compare) to synchronize missing items (e.g. build.gradle, .iml files, etc.).
  • Rename the converted project to "PrjGradle_old" and rename the newly selected project (NewPrj) to "PrjGradle".
  • Open "PrjGradle" in Android Studio. What is it!

Hope this works.

+8
source share

All Articles