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.