Do application development How to view the Android source code

Source: Internet
Author: User
Tags android sdk manager

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 A

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 II

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.


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 Four

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 Five

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

Figure Six

My personal choice is the first way, because our company has the Android 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: 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.