1. Download the Android source code
Android source code can be downloaded from 4.0 using SDK Manager. Open SDK Manager and you can see that 4.4 has been used as an example:
But it always prompts that the download fails and the connection times out. It is estimated that https is a ghost. <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140304/20140304081201261.jpg" alt = "\">
By viewing the Fetch action at the beginning of the Android SDK Manager Log window, all the files opened manually in the browser:
Open this file and you will find the following content:
1.1
2
1
Android SDK Platform 1.1_r1
http://developer.android.com/sdk/android-1.1.html
...
2
19
21819439
433a1d043ef77561571250e94cb7a0ef24a202e7
sources-19_r02.zip
It can be seen that the SDK Manager parses the file during download and downloads the file based on the user's choice.
Find Android API 19 and you can see one of them:
sources-19_r02.zip
It is estimated that this file is used. You can view the log and find that all the files are retrieved in logs.
2. Associate Android source code
Open Eclipse and create an Android project at will. In this project directory, there is an Android 4.4, and the android. jar is displayed after you click expand. Right-click this package ----> Properties. In the pop-up window, select Java Source Attachment ------> External Location ------> External File. Then select the downloaded source-19_r02.zip File to bind the Android Source code to Eclipse.
1. Right-click android. jar
2.select the location of source-19_r02.zip
3. ctl + left mouse button jump to source code
To view the source code, you can jump to the source code by using the ctl + left mouse button. Take Activity as an example:
After the operation, you will jump to the source code section: