In order to develop android applications, it is too troublesome to find the sdk has no source code during development. The following describes how to download the source code and configure it.
Git is required to download the source code. Download a git first. The following operations are completed in windows.
After installing git, run git clone git: // android.git.kernel.org/platform/frameworks/base.git framework
Then run the cd framework
Run the git tag to display the branch. Because android has many versions
> 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 version corresponding to the simulator (emulator)
Finally, copy the java file under framework/core/java to D: \ android-sdk-windowsplatformsandroid-1.5sources
Is the sources under the sdk directory of the corresponding platform.
Then restart eclipse to see the sdk code.