In the Android development, do not see the source code is actually very sad things, about how to view the source of the blog has been many, but today in the attempt to add V4 source code, found a lot of trouble and not reliable way, the experiment for a long time, or did not add, such as the following methods:
- Resolve Eclipse Unable to open android-support-v4 source
- Resolve Eclipse cannot view V4,v7-appcompat source
- Android How to view the Android API source code and support package source code in eclipse
Following these complex methods, it took a long time, eventually did not fix, later steady, finally found in StackOverflow a best solution, and is the official recommended method, the steps are as follows:
- The
- creates a file in the Libs folder and names the file name: android-support-v4.jar.properties, of which android-support-v4.jar to exactly match the name of your V4jar bag
- Open this properties, add the following line of code: SRC=D:/ANDROID/SDK/EXTRAS/ANDROID/SUPPORT/V4/SRC, where Span style= "Color:rgb (34,34,34); Font-family:consolas,menlo,monaco, ' Lucida Console ', ' Liberation Mono ', ' Dejavu Sans mono ', ' bitstream Vera Sans mono ', ' Courier New ', Monospace,serif; font-size:13px; line-height:16.8999996185303px; White-space:pre-wrap; Background-color:rgb (238,238,238) ">src= The path behind is the path of the downloaded SKD on the computer, save, restart, it is OK
Reference Picture
Is not super worry, and the next time a new project, directly copy the file to a new project on it, too convenient
Finally, if you are using the window system, the direct copy of the path, you must remember the change to/...
Of course, this is not the way I invented it, the path of the original
This article basically does not have the original content, still is the annotation translation bar
Android Development: A code to fix Eclipse view V4 source code