Import an eclipse android project with version control system into Android Studio

后端 未结 3 1453
夕颜
夕颜 2020-12-01 03:58

I am trying to import an eclipse project with version control system into Android Studio.

Support for direct eclipse project import was added in Android-Studio vers

3条回答
  •  情歌与酒
    2020-12-01 04:29

    Here is the step by step solution to do it.

    1. Open Android Studio -> Import Project-> Select your project directory. (In above case "MyApp") Remember Select the directory which contains Manifest file otherwise new "direct import wizard" doesn't get triggered and android studio uses old import wizard.
    2. Android Studio will create a copy of your project "MyApp_imported" with new directory structure.
    3. Copy your existing ".git" directory inside "MyApp_imported"
    4. Android Studio -> VCS -> Enable version control This will make Android Studio use your existing repository for imported project. Though imported project has different directory structure but git handles them pretty well. You might want to also call git add . and git add -u in the root folder of the imported project to make sure all new files are added and existing file moves are detected by git.
    5. Android Studio -> Changes Review all files and commit. Git will automatically handle new directory structure and file history etc will not be lost.
    6. Now you can share it on github/Bitbucket by VCS-> Share it on GitHUb Note:- For bitbucket you will have to install "Bitbucket plugin" for Android Studio.

提交回复
热议问题