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!
解决Android开发中Eclipse慢编译问题
本文提供了一种解决在使用Eclipse开发Android应用时遇到的慢编译问题的方法,通过禁用AndroidPackageBuilder和使用ant build部署到模拟器,可以保持Eclipse的正常运行速度,同时在需要在模拟器上运行应用时执行ant install。
1030

被折叠的 条评论
为什么被折叠?



