How to integrate Android source code into eclipse

Source: Internet
Author: User

1,First, download androidSource code:

 

Android 2.0 source code: http://download.csdn.net/source/2931366

Android 2.1 source code: http://download.csdn.net/source/2931364

 

2,Then, create a new name named [Sources.The source code is used as an example, as shown in:

 

 

3,Open the directory where the android 2.1 SDK is located: C:/Android-SDK-Windows/platforms/Android-7 (the specific location depends on the actual situation of each person, here, Android 2.1 corresponds to the Android-7 folder, and so on), and then copies the above [sources] folder to it, as shown in:

 

 

 

 

 

 

 

4,Now it's okay, it's so simple ^_^.

 

 

Let's test it now:

Open eclipse, create an android project, and select Android 2.1 at build target, as shown in Figure :( Note: if you are using another version of Android, select it below, but the premise is that you have put the [sources] folder above into the SDK corresponding to this version)

 

 

 

 

 

 

After the project is created, select fangjian. myactivity in the test package. java] Open the file, press Ctrl, and click the left mouse button, as shown in, to open the source code of the activity class:

 

 

 

 

Shows the source code after opening:

 

 

 

In addition, you can also find the desired class from the [Android] package and double-click it, as shown in:

 

 

 

Finally, it should be noted that some classes may not be able to view their source code, mainly because the downloaded source code package does not contain it.

 

 

 

 

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.