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,fargment, but can not be associated with the source code.

There are a lot of solutions on the Internet, here only a small series of personal testing passed, the attached piece, hope can help everyone.

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

The first step:

Right-click Android-support-v4.jar under the Libs folder in the 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 discover the sequence of Android Private libraries in Android-support-v4.jar before, so when you look at the source of the class in the V4 package, the system is to find the associated source in the Android Private libraries, so it 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.