views:

1244

answers:

3

Hi, I'm completely new to Android development, but I just got a HTC Hero and would like to develop a few applications for it. However, I've use a laptop as my dev machine and the emulator is extremely slow. It took around 10-15 mins to boot up and although I could leave it on, it generally slows down the system when using other applications (like a web browser/Eclipse IDE etc..) What is the best way to develop for an Android phone? I could simply plug in the HTC and constantly load the new APK, but that just seems too long a process to test minor changes. Are there any other methods available for debugging applications, or will I have to brave the emulator until I can get a new system? Thanks

A: 

I don't know much about android-specific development, but are you writing and using tests? If you are you can test a lot of logic without loading up the emulator, as long as you have proper setup methods to simulate the environment.

The emulator or device would then be used to just verify GUI adjustments or device-specific functionality. If that's what you are mostly testing right now, then no, I don't believe there is any other solution.

jsoverson
Hi, the applications I plan on creating are pretty straightforward from a programming aspect. I could create them in on time in a language and API I'm familiar with. However, I don't really know the Android API, so I don't know what setup methods and such I'll need to simulate the environment. Hopefully, they manage to speed up the emulator, or have a slimmed down version for just superficial GUI adjustments.
keyboardP
+6  A: 

Using your HERO is the way to go. The loading of the APK and running the program after each change should only take a matter of a few seconds. If you do not have any emulators running and the HERO is plugged in (with the Android SDK USB driver installed) then Eclipse will automatically select the HERO as the target machine.

fupsduck
Thanks for the reply. I hadn't realised that loading to the Hero was *that* fast. I thought I'd have to create an APK, the push it onto the phone and manually download it as an 'app'. Think I'll leave the emulator on the side until I get my app working on the Hero first :).
keyboardP
+3  A: 

You can indeed just load the app onto the phone and test that way; it's what I do quite often.

Hitting Ctrl+Shift+F11 in Eclipse will automatically compile the app, upload the APK to the running device it finds (whether emulator or phone), and then starts the app.

This takes about seven seconds with my HTC Hero and dev machine (which is admittedly quite fast, but as Eclipse is usually compiling away in the background anyway, most of the time taken is for installation on the phone).

Christopher