Download git Android source code

Source: Internet
Author: User

1. First, install git on your computer. For details, refer to the GIT official website.

2. Open the GIT command window and enter the GIT clone http://android.git.kernel.org/platform/frameworks/base Android (here is the name of your custom folder, we call it Android). I have tried git clone git: // clone? Therefore, we recommend that you use an HTTP address.

The following are:

3. Because the network speed is slow, the power failure in the dormitory has not been completed, and resumable data transfer is not allowed. Therefore, you cannot resume the next morning and finish the next morning. Run the following command:

4. This is all the source code packages. Select 4.0 for download:

Git checkout android-sdk-4.0.3_r1

Soon it will be finished, and then copy the Java folder in core in the base directory to the Sources folder of the corresponding platform folder in your SDK directory, such:

Android-SDK-Windows \ platforms \ Android-14 \ sources (if there is no sources, create a new one)

5. To view the source code while developing, we need to bind the source code to the eclipse environment:

You can open an android project you wroteCodeFile, move the mouse over an android class such as activity, then eclipse will automatically pop up a small window, there is a menu-style open deconfigurtion on the bottom of the window, after clicking, it will prompt that no sources is found, click attach source, select the Java folder in the previous step, and click OK.

In this way, you can view the activity again.Source codeNow!

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.