almost 9 years ago

In this part, I will introduce how to git clone repository.

Because Android Studio update frequently, I suggest that you'd better to check update for newest version.

And check your Android SDK update, it's usually involving to your development environment.

Let's start it!

Step 1 : Git Clone

If you start Android Studio without open any projecct, just choose Ceckout from Version Control, then select Git

Glone Repository pop-up window will appear.

If you already opened an Android Studio project, follow step to open pop-up window.

VCS > Checkout from Version Control > Git

git clone.png

git clone1.png

In this Step, if your clone folder name does not equal to original project, it will automatically generate new <folder name>.iml into you project.

Such as figure, my original project folder is "AndroidStudioGitProject", new folder named "android-sutdio-git"


Step 2 : Reset Project Structure

In general, Android Studio would automatically reset it.

But if your environment isn't the newest version, you may probably reset yourself.

The third figure show that which file reset by Android Studio.

After changing by yourself, to do sync project with gradle files and restart.

  1. Tools > Android > Sync Project with Gradle Files

  2. File > Invalidate Cache/Restart... > Invalidate and Restart

budle.gradle you should reset yourself. Especially build tool version.

In my origal project, I used older Libraries to develop, so Android Studio help me reset some properties and add new files to project.

Step 3 : Modify "externalProjectPath" value

You must get warnning notification, if your folder path doesn't equal to original project.


Just go to modify gradle.xml in .idea folder.

Redirect value to current project path.


Now, you can compile your clone project.

Enjoy it!

← Android Studio Git Tutorial (Part 1) Google Cloud Message for Android →
comments powered by Disqus