Import GitHub project to Android Studio

Import GitHub project to Android Studio

Problem

You have an existing GitHub project and would like to import it to Android Studio.

Solution

Perform the following steps to import your project.

Step 1: Install git for Windows

It can be downloaded for free from git-scm.com.

Most settings available during the installation process should be compatible with Android studio. Just choose the settings you deem the most appropriate.

Open Android Studio and got to Settings. In the Setting dialog open the page Version Control / Git. Here define the path to the git executable you have just installed.

Step 3: Get the Path to your Repository from Github

Go to the GitHub page and get the HTTPs path to your repository. For instance:

https://github.com/mxro/WallOfTheWiseAndroid.git

Step 4: Import the Git project to Android Studio

Go to Android Studio and go to Menu / VCS / Checkout from Version Control / Git

Paste the HTTPS path you obtained from GitHub in the previous step and click on [Clone].

Provide your GitHub username and password.

Now the project should be imported to Android Studio and you should be able to commit and push future changes back to GitHub.

References

Android Studio Git Tutorial (Part 1) « Wii's Blog

github - How to clone a remote git repository with Android Studio? - Stack Overflow

Setup Android Developer Studio | devroyal.de