After creating a new Android development setup on my computer I noticed a huge delay in the autocomplete in Eclipse, when working with my apps.

When trying to access certain objects functions with a dot, Eclipse freezes for a couple of seconds, before giving me the autocomplete options.

This delay is very annoying, I found the solution, and I would now like to share it!

You need to download some source files spesific to which Android API version you are working with.

The URL is;a=snapshot;h=<API version>;sf=tgz

And you have to replace <API version> with one of these:

  • gingerbread for API 9 – Android 2.3
  • froyo for API 8 – Android 2.2
  • eclair for API 7 – Android 2.1
  • donut for API 6 – Android 1.6

so the URL becomes for example;a=snapshot;h=froyo;sf=tgz
for froyo, or:;a=snapshot;h=gingerbread;sf=tgz

for Gingerbread. (Thanks Gyuri).

Also, as Al Sutton mentioned in the comments, you can use SDK tags like android-sdk-2.2_r2, which would look like this:;a=snapshot;h=android-sdk-2.2_r2;sf=tgz

Thank you Al.

The download is about 100 MB.

After you have downloaded the file, (which comes as .tar.gz by the way), you have to open the archive, and copy the contents of the base directory, into your

<android-SDK>\platforms\android-<API version>\sources

directory. (Create the sources directory if it does not exist)

When you now start Eclipse, you should have autocompletion working fine again!

Please share this article!