Do application development How to view Android source code

Source: Internet
Author: User
Tags android sdk manager

when we develop Android programs in eclipse, we often need to look at the source code (probably out of curiosity, probably read the source code habit). So how to view the Android source code it?

If we want to see the source code of the Activity class. Press the CTRL key. Left-click on it. The actual result can not see the code, the message is "Can't find Activity.class file".

At this point, click the button below, "Change attached Source ...". Choose the location of the Android source code.


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

There are two different ways

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

(2) Select External Floder...button and add the path to the directory.

The following questions are coming, where is the source? It can't be produced out of thin air.

Can download the source code via Android SDK manager. (recommend this method)


Tick the source for Android SDK. You can download it.

It can also be downloaded by other means. There are very many shared resources on the web.

Here is another way to choose the (2) method. Select the folder where the source code is located


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


The above content transferred from Baidu Experience

My personal choice is the first way. Because our company has the Android source code

Do application development How to view 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: 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.