Android basics: Associate SDK source code with es and view SDK source code

Source: Internet
Author: User

During Android Application Development, we sometimes need to view the source code of a class or interface to learn how to use a class or implement an interface, viewing the source code helps us to learn how the underlying layer of an encapsulated class is implemented. This will help us master the excellent design methods of classes or interfaces, and thus improve the self-writtenCodeIn addition, we are writing applicationsProgramIn the process, you can view the source code of a class to understand the usage of this class, so that you can correctly use each class and interface to improve development efficiency. In this caseSource codeIt is necessary for us, especially for beginners. Below are the specific steps:

1. In elasticsearchHow to associate the SDK source code:

① Create an android project in elasticsearch, select project> right-click and choose Properties> Android> Project Build target from the drop-down list, and then select the SDK version of the source code to be associated. For example, Android 2.3.3.


② Click the left-side Java build path-> switch to the libraries panel, expand android2.3.3-> Expand Android. jar-> selectSource attachmenT-> click Edit-> select external location in the displayed dialog box and clickExternal file,Select the source code compressed package of the SDK version to be associated after the download, click OK all the way, and then associate the android Java code.


Appendix:The source code of each Android version is:

Android1.5 android_cupcake_javasrc.zip

Android1.6corresponds to android_donut_javasrc.zip

Android2.01and android2.1-update1correspond to android_eclair_policrc.zip

Android2.2corresponds to android_froyo_javasrc.zip

Android2.3corresponds to android_gingerbread_policrc.zip

Android4.0 corresponds to android4.0.1 _ javasrc. Jar

Source code compressed package:Http://code.google.com/p/lizongbo/downloads/list

 

2. How to view the SDK source code in ES:

① Place the cursor over the class name of the class to be viewed, select the pop-up dialog box, and click the "open declaration" icon to view the source code of the class.


 

If there is anything wrong with the above description, please make a brick!

 

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.