Android SDK source to be viewed in Eclipse

EDIT: (2011/11/22)
It seems that after upgrading the SDK, the source folders were deleted.
I found a nice tool as an Eclipse plugin that attaches the source code.
The problem is that it currently supports only up to Android v2.3.4.
Or you can do it the manual way, as stated in my original post below.

Original post:
Attached are the sources to:

Attaching sources to android.jar in Eclipse

Unzip them to the appropriate platform ander the android SDK folder.
android-sdk-2.1_r1 -> android-7
android-sdk-2.2_r2 -> android-8
android-2.3.3_r1a -> android-10

If you use api level 7 or 8, just restart eclipse and you should be able to view the source code (F3 on the Activity class :)

Hope it helps and you don't need to start messing with git, scripts, etc. - not that I'm against them, just thought of saving some time to other Android developers.

Also, I migrated the script from Mac to any other Linux. You can download it here.


  1. Thanks a lot. Right on time for me :) Until now I used to go to Google code search.

    (p.s. this is the second time I'm leaving this comment. The previous time I totally missed the CAPTCHA :S)

  2. :)

    It doesn't include everything but it's a lot more than nothing ;-)

  3. It's great to know I could help in some way