In order to develop an Android application, it was found that the SDK did not have source code at development time, so it was too cumbersome to develop, and here is how to download the source code and how to configure it.
Download the source code requires git, first download a git. The following actions are done under Windows.
After installing GIT, clone git://android.git.kernel.org/platform/frameworks/base.git framework via Git
Then run the CD framework
Then run git tag and show the branch because Android has many versions, such as getting
>git tag
android-1.0
android-1.5
Android-1.5r2
Android-1.5r3
Android-1.5r4
Android-1.6_r1
android-1.6_r1.1
android-1.6_r1.2
android-1.6_r1.3
android-1.6_r1.4
Android-1.6_r2
Android-sdk-1.5-pre
Android-sdk-1.5_r1
Android-sdk-1.5_r3
Android-sdk-1.6-docs_r1
Android-sdk-1.6_r1
Then use
git checkout android-1.5r4 switch to the emulator (emulator) corresponding version
Finally, copy the Java files under Framework/core/java to D:\\android-sdk-windows\platforms\android-1.5\sources
is the corresponding platform under the SDK directory under sources.
Then restart eclipse so you can see the code for the SDK.
"Go" Download Android.jar Source Code using the Git tool