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-eclipsestackoverflow – android-eclipse-workspace-takes-a-long-time-to-buildgroups.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!
标签:building,slow,workaround,eclipse,ant,build,key,android,problem From: https://blog.51cto.com/u_16125990/6404524