Adding Android source to your project

Originally added January 31, 2011

I've looked into this a couple of times, and was always 'too busy' (read, too lazy) to bother to grab the various source packages from git, but here's a post from a while back from someone who gathered a few platforms and put them together in a zip. Currently, it only has 1.5, 1.6 and 2.1, but it's better than nothing.

If I find a better way or more up to date sources, I'll post an update here.

Basically, create a folder called sources in your sdk folder under the appropriate platform, and unzip the source code contents into it. For example, 2.1 is API level 7 so my folder is <sdk folder>/platforms/android-7/sources.

I hit refresh in Eclipse, and now I can browse the Android source (assuming 2.1 in my case) easily in the IDE.