View Android source code in eclipse

Source: Internet
Author: User

Disclaimer: A master skips this article

When we develop the Android program in Eclipse, we often need to look at the source code (perhaps out of curiosity, may be the habit of reading the source code), then how to view the Android source?

such as the following situation


Figure 1

Suppose we want to see the activity Class source code, press the CTRL key, left click on it, the actual result is not see the code, the message is "Can't find Activity.class file".


Figure 2

Click on the button below, "Change attached source ...", select the location of the Android source code, then pop up the dialog box of figure three.


Figure 3

The first is to select the working directory, the existing Android application source code.

The second is divided into two ways

(1) Select External File ... button, add jar format file or zip format file path;

(2) Select External Floder ... button to add the path where the folder is located.

Here's the question, where's the source code? It can't be produced out of thin air.

Source code can be downloaded via the Android SDK Manager (recommended), four


Figure 4

Check the source for Android SDK to download.

There are also other ways to download, there are many shared resources on the Internet.

Here choose the second way of (2) method, select the source directory (that is, the map to download source code directory where the path), five


Figure 5

Click "OK" button, at this time, the activity file will be able to view the source code, six.


Figure 6

That's it!!!

View Android source code in eclipse

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.