2

I don't have 50 reputation so I can't comment on: https://stackoverflow.com/a/24741965/1487317

If I follow that linked solution, will the directory structure in the git repository be converted to Android Studio structure?

If not, how do I import Eclipse project with source control to Android Studio without changing the directory structure?

Community
  • 1
  • 1
EternalMelody
  • 121
  • 1
  • 6

2 Answers2

2

Yes, following that will result in the directory structure being converted to the new structure, although the history is preserved.

In order to import Eclipse project with source control to Android Studio while preserving the directory structure, do NOT import from Android Studio.

Instead, export from Eclipse the Gradle build files.

In Eclipse:

  1. File > Export > Android > Generate Gradle build files > Next
  2. Check the desired projects > Next
  3. Finish

Then in Android Studio:

  1. Import project
  2. Navigate to the folder of the Eclipse project to import
  3. Choose the build.gradle file (NOT THE PROJECT FOLDER)

After that, Android Studio will load the project without changing the directory structure. Note that if you import this way, the Eclipse project is NOT copied.

EternalMelody
  • 121
  • 1
  • 6
0

No. I imported an Eclipse project into Android Studio some time ago and it kept the old Eclipse structure. The importer was kind enough to just set up build.gradle to accommodate that structure.

Nebu
  • 1,352
  • 1
  • 14
  • 21