Simple eclipse associated SUPPORT.V4 source code

Source: Internet
Author: User

Recently many people asked me how about the V4 package API, in fact, these can be resolved through the associated source code. But many people will find that when we hold down the CTRL mouse to click on the corresponding method or class, we find that we cannot view the button items without the associated source code. No action is possible.

As shown in the following:


So what do we need to do to properly correlate V4, V7, support and other source code? Below I simply do the operation demonstration. operate under Windows and Mac, respectively. The procedure is basically similar, except that the interface is slightly different. This is only a detailed explanation of the win8.1. Readers can associate themselves with the procedure.

1. Under Windows Platform (win8.1):1.1. Right-click on the project you want to associate with the eclipse, or use the shortcut key Alt+enter to open the Options menu and select Properties


1.2. Follow the diagram on the Project Properties page. Note: In the third step there may be people who will encounter the gray cannot click when remove, this time need to click on Android Private libraries to remove.


1.3, after removing the V4 jar package file under the project, we need to add a local V4 package. Otherwise, if the project introduces the contents of the V4 package will be an error. Click Add External jars to find the V4 package under the SDK. Generally {SDK_HOME}/EXTRAS/ANDROID/SUPPORT/V4 According to the required source code to find can.
PS: Note here, switch to the order and export interface, the introduction of the jar ticked. If you do not tick, the packaged file will report that the class cannot find an exception. The attention point here is very vague and not easy to find. Many people do not know why the introduction of V4, compile time without error, but a run will appear the class can not find the exception. The reason is here. Another point is that there are times when there is a dependency order and what needs to be introduced first. is also very important.
1.4. Closeon the Project Properties page, once again, hold down CTRL and click on the mouse, and you will find that the first picture still appears, but you will find a button that attach the source more often.
1.5, we click Attach Source to find the source code under the SDK directory, that is, the third step {Sdk_home}/extras/android/support/v4 is associated with the source code.} We choose external location, then choose External Folder, find the source position click OK.
1.6, the operation is successful, we can see that the source code of V4 has been successfully displayed. Done.

Simple eclipse associated SUPPORT.V4 source code

Related Article

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.