Download the android SDK source code with Git in Windows and open it with eclipse

Source: Internet
Author: User

1. First download the GIT tool.

Git: http://code.google.com/p/msysgit/downloads/list under Windows

The top one.

The installation process is similar to that of common Windows software.

The GIT icon added on the desktop is used to start and use the shell command tool. The operation commands are the same as those in Linux.


2. Open the GIT window and create a folder where to store the downloaded SDK source code.

Then enter the folder and enter the GIT clone https://android.git.kernel.org/platform/frameworks/base

I started to download the SDK source code. The network speed is not good. I spent more than 900 MB in total. I spent one afternoon and one night.

Enter the base Directory of the folder after the installation ,:

Run the following command:

git tag

You can see the sdks of each version, select the SDK to download, such as 4.0.3, and enter the command

git checkout android-4.0.3_r1

The download will be completed soon. After the download, copy the Java folder in the core in the base directory to the Sources folder of the corresponding platform folder in your SDK directory, for example:

C: \ Android-SDK \ platforms \ Android-15 \ sources (if there is no sources, create a new one)

Then, we need to bind the source code to the eclipse environment to make it easier to view the source code while developing:

You can open an android project code file you wrote, move your mouse over an android class, such as activity, and eclipse will automatically pop up a small window, there is a menu-style open deconfigurtion on the bottom border of the window. After clicking it, you will be prompted that sources is not found. Click the attach Source button, select the Java folder in the previous step to store the directory, and click OK.

In this way, you can view the source code when you view the activity again!

Note: Do not forget to run the "exit" command in the command line to exit the window.

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.