Android Studio opens GitHub open source code

Source: Internet
Author: User

1. Recently downloaded open source code is all from GitHub, has been developed with Eclipse, for Android Studio is a new

2. Import a project in eclipse that is so eassy, import choose to be able.

3, into the Android studio inside, import that would cost a lot.

Import a few times with the same as dead, only see progress bar move, in fact, Android Studio is in the download file Gradle

Try:

All new one Hello project, fix, no problem, compile successfully

The catalog of the project is shown above

Open the project and discover that there are several places different from the open source code on GitHub, according to the configuration file, Android Studio (AS) dude can't find it,

So he did his best to find the network download and then download the SDK, so he stopped there.

------------------------------------------------------------------------------------------------------------

Take the Android-floating-action-button-master downloaded online for reference.

Https://github.com/shamanland/floating-action-button

As long as the preparation of the open source files downloaded from GitHub is modified to the formulation of our new project, it's OK.

1) First Find Android-floating-action-button-master\build.gradle (1, root directory of Build.gradle)

Open the self-built Hello,

Change the above 1.1.0 to 1.5.0.

2) Locate the Settings.gradle in the root directory and open the file display

Include ': library ', ': Sample '
In other words, the Library and sample Build.gradle tell the system with what SDK, and we compile, please change to the new hello consistent with the line

Also, take the part of the red frame out of the//apply from: './gradle-mvn-push.gradle '

The Build.gradle in the sample directory is also adjusted accordingly.

Modify Future Files Build.gradle

3) Find Android-floating-action-button-master\gradle\wrapper\gradle-wrapper.properties

Will draw the red box to the new project Hello, or the system to download the file, slow long wait.

After the above steps, the preparation of the document is almost changed, the following is the import

Then, if you choose, OK wait a moment to succeed. Run Sample, get a picture.

Android Studio opens GitHub open source code

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.