Take V4 Package For example, record three kinds of related third party jar package method, first you need to have third party jar package source code, can associate, take V4 package for example. To your this directory adt-bundle-windows-x86_64-20130729\sdk\extras\android\support\v4 see there is no src folder, this is the source of V4, if not, you can Android SDK manager download Android support Library, if you can't download Baidu it.
1. Create a new properties file in your project's libs directory with the same name as the third-party jar package you use, If it is Android-support-v4.jar, then the corresponding android-support-v4.jar.properties file
Enter src= your third-party jar source directory in the. properties file, for example, my
Src=d:\\develop\\adt-bundle-windows-x86_64-20130729\\sdk\\extras\\android\\support\\v4\\src
2. Right-click V4.jar->build path->add to Build Path, actually in our project even if not ADD also exists jar package
But the system does not allow the private libraires associated source code, so we need to add one then right-click the jar package Properties->java source Attachment
Then choose your source directory, but you will find that still can not see the source code. Why is it? This is because the Android Private libraries in the project has Android-support-v4.jar. From the project's Java Build Path tab, order and export can be found on the Android Private Libraries order is located in the Android-support-v4.jar before, so when you look at the V4 package in the source of the class, the system is to find the associated source of the Android Private libraries, so cannot be found.
Open the order and Export of the Java Build path
Tell the jar pack to move to Android Provate Livrares.
3. The above two methods can only be in the project set up to view the source code, that is, each construction project should be configured once, the following method is only set once
1. Right-click your project, properties->Java Build path->libraries, remove Android provate livrares
2 . After removing the jar package file for V4 under the project, \ Add a local v4 package. Click Add External jars to find the V4 package under the SDK.
3. Switch to the order and export interface to tick the imported jar. If you do not tick, the packaged file will report that the class cannot find an exception. Here is why the introduction of V4, compile the time without error, but a run will appear the class can not find the exception. Of course, some jars are required to be packaged and not packed in. For example, Apkplug seems to be unable to pack in, this place can not be checked
4.F3 or CTRL + Left button, will come out attach Resoure Select the source directory can be
Associated third-party jar packages in eclipse