when we develop the Android program in Eclipse, we often need to look at the source code (perhaps out of curiosity, may be the habit of reading the source code), then how to view the Android source?
such as the following situation
Figure A
Suppose we want to see the activity Class source code, press the CTRL key, left click on it, the actual result is not see the code, the message is "Can't find Activity.class file".
Figure II
Click on the button below, "Change attached source ...", select the location of the Android source code, then pop up the dialog box of figure three.
Might
The first is to select the working directory, the existing Android application source code.
The second is divided into two ways
(1) Select External File ... button, add jar format file or zip format file path;
(2) Select External Floder ... button to add the path where the folder is located.
Here's the question, where's the source code? It can't be produced out of thin air.
Source code can be downloaded via the Android SDK Manager (recommended), four
Figure Four
Check the source for Android SDK to download.
There are also other ways to download, there are many shared resources on the Internet.
Here choose the second way of (2) method, select the source directory (that is, the map to download source code directory where the path), five
Figure Five
Click "OK" button, at this time, the activity file will be able to view the source code, six.
Figure Six
My personal choice is the first way, because our company has the Android source code