Importing a github project using Androidstudio

Source: Internet
Author: User

1. Configure GitHub's project address in studio

2. When you click on GitHub, it will look like this

3. Place the address you want to clone, then click Clone.

4. This page will appear after a while, and then click Yes to show this page

5. There are two options, the first one is to use the default Gradle version of the project, one is to use your local gradle, I chose the second one here,

This will not have to download, download, you know. Then click OK, and wait just fine.

6. This looks like you've been successful.
According to personal preferences, choose a good one in the current window to open this project, one is to open this project in a new window
When you're successful, in your tool-bar VCS

7. Encountered this problem when importing:

Whether you choose the first use default or the second option Use Local will prompt this dialog box, reported this error, the cause of this problem is actually very simple,

There are fewer files in the project that were imported into as, and the author did not commit when the push code was on GitHub, but the effect was not very large. There should be two kinds of solutions,

Guess, I just used one to solve, the exception of one should also be possible.

8. Resolve

The first way, as prompted, we can create a new project or work on our own, and then copy the Local.properties file to the project that we want to import from GitHub, which is what I am, and the problem is solved.
The second method, according to the prompt, we can add the location of our SDK to the environment variable, we can see the location of the SDK on my computer.

Can know the location of our SDK, and then add this path to path, of course, the same steps, we want to start with android_home, add the path to the name, and then add%android_home%\tools in Path.
Of course I have a problem after solving this problem, in Gradle, because my build.version version I this as not, so also reported this mistake
Failed to find build Tools revision 25.0.2, well, he this version is too new, I have 25.0.1 but not 0.2, so either go to the project under their own to change the version to our own, or download a, I choose to download. Enter a normal project Click Sdkmanager Manage Our SDK, then. Of course download what you lack.



Importing a github project using Androidstudio

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.