View the Android source code in eclipse

Source: Internet
Author: User
Tags android sdk manager


Disclaimer: Experts skip this article

When we develop android programs in eclipse, we often need to look at the source code out of curiosity, maybe the habit of reading the source code). So how can we view the Android source code?


For example

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1036123592-0.jpg "style =" float: none; "title =" 1.jpg"/>

Suppose we want to see the source code of the Activity class, press the Ctrl key, and left-click it, but the actual result will not see the code. The prompt message is "Activity. class file cannot be found ".

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1036124V5-1.png "title =" 2.png" style = "float: none;"/>

Click the button below, "Change Attached Source ...", Select the location where the android source code is located. The pop-up dialog box appears.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1036123240-2.png "title =" 3.png" style = "float: none;"/>

First, select the working directory, that is, the existing android Application source code.

The second method can be used in two ways.

1) select External File... Button to add a Jar or zip file path;

2) select External Floder... Button to add the path of the folder.

Here's the question: where is the source code? It cannot be created out of thin air.

You can download the source code through Android SDK Manager. This method is recommended.), 4

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/103612B36-3.png "title =" 6.png" style = "float: none;"/>

Select the Source for Android SDK and download it.

In addition, you can also download it through other channels. There are a lot of shared resources on the Internet.

2) method, select the directory where the source code is located, that is, the path where the source code directory is downloaded .),

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1036124152-4.png "title =" 4.png" style = "float: none;"/>

Click the "OK" button, and then the Activity file will be able to view the source code, 6.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1036124608-5.png "title =" 5.png" style = "float: none;"/>

This is all done !!!


This article is from the IT traveler blog, please be sure to keep this source http://fylxopensource.blog.51cto.com/1328715/1286586

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.