When you develop an Android application in Eclipse, sometimes you want to see the internal implementation of the function, but when you click CTRL and the left mouse button on the function,
The following tips often appear:
Class File Editor
Source not found
The JAR of this class file belongs to Container ' Android ' which does not allow modifications to source attachments on its Entries.
The most common is that android-support-v4 can not see the comments and source code, the mouse on the class prompt:
Note:this element Neither have attached source nor attached Javadoc and hence no Javadoc could be found.
In general, if the environment is configured well, all Android classes and all methods can see their code and comments, the following two steps, the comments and the code are all configured correctly.
1.Android source of the jar package itself
This assumes that you have downloaded everything you need to download, right-click project = = "Build path====" Configure build Path
In libraries choose android x.x.x inside there are Android.jar, this is the development of the android itself depends on the SDK jar package, open, there are two need to configure,
Sources attachment and Javadoc location, the former is the source code, the configuration can be achieved CTRL + LEFT mouse button directly click to see the Android class,
The latter is the source code of the comment file, configured to implement the mouse on the want to see the class, will show the introduction of this class or method
Select the source attachment configuration item, click on the right edit, select external location=== "External folder, then find the correct path, mine is in e:/eclipse/sdk/sources/ Android-19
Select Javadoc location configuration item, edit, select Javadoc url=== "Browse, and then find the correct path, mine is in File:/e:/eclipse/sdk/docs/reference
By doing this, you can see the usual class comments and source code inside Android.
2. View source code for external dependent jar packages
This assumes that you have imported the external dependent jar package correctly and compiled it, but Ctrl + the left mouse button to see the code or to see its comments is not feasible,
First find the package introduced below Libs, here take Android-support-v4.jar as an example,
Create a new android-support-v4.jar.properties file under Libs, that is, a file with the same name as the referenced jar package and finally Add. Properties
The contents are as follows:
src = e:\\eclipse\\sdk\\extras\\android\\support\\v4\\src
Here the path to adjust according to your own path, after the configuration to exit Eclipse, in the entry, you can view the normal.
jason0539
Weibo: http://weibo.com/2553717707
Blog:http://blog.csdn.net/jason0539(reprint please indicate the source)
Android Development tips for viewing external dependent jar source _android private libralies does not allow modifications to source