android: workaround for slow ‘building workspace’ problem in eclipse

While developing for android on eclipse 3.6 i had the problem that each time i saved a file, eclipse blocked me several seconds with ‘building workspace…’. Similar to these:

stackoverflow – android-compilation-is-slow-using-eclipse
stackoverflow – android-eclipse-workspace-takes-a-long-time-to-build
groups.google – android-developers/thread/a16202975510de39


The best workaround i found for me:

  • disable Android Package Builder (right-click on project#Properties#Builders)
  • use ant build to deploy on emulator

This way i can work (as) fast (as usual) with eclipse, everything compiles and gets generated, but once i want the app on the emulator, i execute ‘ant install‘ from console.

Setting up the ant build is quite easy, see using-ant-to-automate-building-android for details.
In short you have to simply execute ‘android update project --path .‘ which generates your build.xml.


Note: If you have 3rd party jars put them in ‘libs’ folder, that way ant is aware of them.

Note: You also can build a signed apk with ‘ant release‘. Add therefor a build.properties with such a keystore setup:


key.store=/Users/jz/.android/debug.keystore
key.alias=androiddebugkey
key.store.password=android
key.alias.password=android

 



PS: i also stumbled into the ‘external folder’ synchronization problem. Closing all android projects and reopening again helped!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值