One, non-private library to view the source code
Non-private library add source code is very simple, here only one. Right-click the Jar file properties Java Source Attachment, for example, add External folder.
Second, the private library to view the source code
Android-support-v4.jar and Android-support-v7-appcompat.jar are placed in the Android private libraries directory, which belongs to the private library and cannot be used in this way.
In the directory where the jar file is located, set the properties file to which it should be, and add a row src= the directory where the source files are located.
1. Android-support-v4.jar View Source code
If Android-support-v4.jar is under the Project Libs directory, create a new file directly under that directory, named Android-support-v4.jar.properties, and add a row to the file as follows
src=d:\\devapp\\android\\android-SDK\\sources\\android-22
My source code was downloaded by opening the SDK manager in Eclipse and stored in the Sources folder in the SDK installation directory. I have selected the source file under the current android-22. Android-21 source files I have downloaded, but I would like to use the latest.
What is said on the Internet source code in the \ANDROID-SDK\EXTRAS\ANDROID\SUPPORT\V4\SRC directory, I tried, no.
In the beginning, I pointed the source file directly to D:\\devapp\\android\\android-sdk\\sources\\android-22\\android\\support\\v4, which is not possible.
If the jar package is not in the Libs directory of this project, it is possible to locate the jar file under the path referenced by the library and to build the properties file of the jar file in the same directory, and the SRC path is also available in the file. I tried to reference a jar file for another project, and only added the properties file under the referenced Project Libs directory. All other projects referencing the jar file can view their source code.
2. Android-support-v7-appcompat.jar View Source files
Android-support-v7-appcompat.jar View Source file method and the same reason above, create a new android-support-v7-appcompat.jar.properties file, add src=d:\\ devapp\\android\\android-SDK\\sources\\android-22. Yes, their SRC path is the same, without suspicion.
Android View Private library Android-spport-v4.jar & Android-support-v7-appcompat.jar source code