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:
- android-sdk-2.1_r1 (API level 7)
- android-sdk-2.2_r2 (API level 8)
- android-2.3.3_r1a (API level 10)
Reference:
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.