View Android source code in eclipse

Source: Internet
Author: User
It's highly desired to be able to examine and debug into Android framework source code. eric burke showed how he figured out where to put the source code so that ecplise will associate the android. jar with the corresponding source code. unfortunately, it didn't work after I followed him step by step.
Then I turn to procmon for help.
First, I start eclipse. then, run procmon and add a filter of process name equals eclipse.exe. after I captured the file system activities when I tried to view a Android framework class's declaration which ends in not finding the corresponding file. I noticed there is a failure on the following path: android_sdk_installation _ Folder \ platforms \ Android-1.5 \ Sources. Here we go, this must be the correct place to put Android source code.
So, the solution is :
1. Create a Sources folder in android_sdk_installation _ Folder \ platforms \ Android-1.5 \
2. Copy everything in android_1.5_cupcake_src \ Frameworks \ base \ core \ Java \ To android_sdk \ platforms \ Android- 1.5 \ sources

It's very likely that Eric is using an older version of Android SDK which has different file structure from my android SDK 1.6r1. though his blog isn' t totally accurate for current version, I still want to thank him for showing me the right way to go with his smartness.

Update:
the Step 2 isn't a good way to organize Java file because it only put Framework's source code in place. the best tool I'm aware of is this Python script by Damon kohle. he improved the one provided by Michael and it will adjust the source code organization to fit eclipse's needs.

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.