# How to get faster iteration times in android development

I'm creating a game on the android platform that uses the resources/raw folder for assets and scripts. The problem is that every time I change something I have to rebuild the application to test the new variant. Of course this is bad for iteration times.

Any ideas about what I can do to avoid rebuilding every time I change something? This *.apk format is getting on my nerves now that I have to recreate it every time I change a word in my scripts.

Or at least how to make eclipse auto-rebuild every time I change something in my resources folder so that I don't have to go to Project->Build every time?

• I've personally never had a problem with iterations taking very long (4-5 seconds max usually). The only slow part of Android development seems to be the emulator if you're using it (which I don't). – Amplify91 Sep 13 '12 at 22:50
• If you're concerned about iteration times on changing individual words then it feels like there may be something in your process that could change - why are you not batching up a list of 'text that needs fixing' and doing a stack of them at once? I'm of the opinion that by and large you shouldn't be rapidly iterating on game assets in the first place... – Steven Stadnicki Sep 14 '12 at 18:06

Have you tried to use something like libgdx? It allows you to build your app with a PC runtime and then you can publish to the device less often. Makes tweaks like you are dealing with much easier to handle.

• But you still have to test on an emulator from time to time and real device, since there surely will be problems that you won't have on the pc platform. – Sebastian Bugiu Sep 20 '12 at 14:29

Not sure if this applies to Android development, but this is what I do when I'm doing Java development with Eclipse. I select Project->Build Automatically. If you're making the changes to your scripts using Eclipse as your editor, on save the project will build automatically. However, if you're editing the files outside of Eclipse, you will have to select your project in the Project Explorer and press F5 to refresh external changes. If changes are detected, it will build automatically.

My approach to this problem was to support native builds of the same project on Linux/Windows. The same assets I use in Android are also used on my development platform, so I can build and deploy within seconds without having to spend lots of time rebuilding Android asset files, APK's, push to phone / emulator, etc.

Similar to what stephelton said, I think the best way to do this is to have a Java-only (not Android) version of your game that you run on your PC.

If you think about it, the only parts of your game that actually are specific to the Android OS are implementing rendering calls and converting raw input to serialized Input. The game loop, framework, messaging system, physics, AI, sounds, etc. should all be the same, regardless of the target platform.

It may seem like a pain to have to port your game from Java on your computer to Android, but I think you'll end up being able to work a lot faster in the end.

If you don't decide to do this, then try stripping your app of all unnecessary/extra resources, activities, etc and having the app boot right to the game. This will decrease installation times, boot times, and time-to-finding-a-bug. For example, that 3 second splash displaying every time you open your game will add up quickly.