用eclipse开发android app,自动补齐时很慢很卡的解决办法(转帖)

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

http://android.git.kernel.org/?p=platform/frameworks/base.git;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:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=snapshot;h=froyo;sf=tgz

for froyo, or:

http://android.git.kernel.org/?p=platform/frameworks/base.git;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:

http://android.git.kernel.org/?p=platform/frameworks/base.git;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!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值