Download Android source code and bind it to eclipse

Source: Internet
Author: User
In Windows, Android downloaded through SDK manager.exe is updated without the source code, which is not very convenient for development;

In fact, the android source code can be downloaded. The source code is uploaded at http://android.git.kernel.org/, and the download package installs git, as shown below:

1. Install git
Download http://code.google.com/p/msysgit/and install msysgit. the installation is simple and can be set along the way;
After the installation is successful, add the bin directory to the path environment variable;

2. Download the source code
Create a directory for storing source code, such as E:/code/androidsdk;
CMD to this directory, run the command: git clone git: // uninstall;

3. Bind the source code to Android. jar.
The most intuitive method is to right-click android in eclipse. JAR file, and other attributes, bind the base/CORE/Java file. However, this is not convenient for every new Android project;
The second method is easier. Just do it again. Create a new sources directory under platforms/Android-12 Under the installation directory of androidsdk, copy the core/Java content, and then restart eclipse. The bad thing is that the source code cannot be updated in time;

Installation is just the beginning of learning Android. What is really difficult is to keep learning. Come on ~~~~

Reference from: http://www.cnblogs.com/obullxl/articles/2072583.html

[Add By yourself ]:

When downloading the source code according to the above method, the following error occurs: Fatal: Unable to connect to android.git.kernel.org. For various reasons, the company may use the lan isp to block port 9418 of git, because the http://android.git.kernel.org is accessible. After I searched for a lot of git servers to provide port 80 download at the same time, so you just need to change the command git: // android.git.kernel.org to http://android.git.kernel.org. Follow the above solution to download the source code and bind it.
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.