Android associated source support-v4,v7,v13 source code

Source: Internet
Author: User

In the actual Android development process will often encounter the use of v4,v7 or V13 Compatibility Pack some classes such as viewpager,fragment, but can not be associated with the source code.

After the online search, there are many ways, here only to introduce one, I used to feel good method

Specific steps (here Android-support-v4.jar for example, V7 and v13 steps are the same):

First step: Right-click the Android-support-v4.jar under the Libs folder in your Android project and select Add Build path in the build path.

The purpose of this is to convert the private package of Android-support-v4.jar into a referenced package because the system does not allow the source code to be associated with private packages, but it can be used to correlate the source code for the referenced package.

Step Two:

Select the Android-support-v4.jar package in referenced libraries, right---->properties-->java Source Attachment--->location The path in path is the source code path/EXTRAS/ANDROID/SUPPORT/V4/SRC.


This is the referenced libraries in the Android-support-v4.jar package associated with the source code, at this time you will find it is still unable to F3 view V4 package of the source of the class. This is because there are android-support-v4.jar in the project in the Android Private libraries. 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.

Step Three:

Before order and export move the order of Android-support-v4.jar to Android Private libraries.

This gives you access to the source code for the classes in the V4 package:

Android associated source support-v4,v7,v13 source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.