5

Hi
Suppose I have written a litter program in Eclipse, how can I export it to an apk file so as to transfer to my HTC Desire for testing?

Thanks

Charles Yeung
  • 38,347
  • 30
  • 90
  • 130
  • As evilone suggest you can just run the build live directly to your HTC Desire over usb. This will allow you write to the Log.d window in Eclipse while running/testing the program on your phone. This will place an apk signed with the debug key on your phone. If you export and use your key, then you can transfer a properly signed apk using the adb command line tool to your phone. TIP: you will not be allowed to download the properly signed apk to your phone from the Android Market if you have a debug signed version on your phone. – JAL May 29 '11 at 08:36

2 Answers2

14

Right click on your project and click Android Tools -> Export Signed Application Package or Export Unsigned Application Package.

If you choose signed package then you need to create a keystore. If you choose unsigned package, then you need to enable "Unknown sources" option from your phone in Settings->Applications menu.

Also you can use your phone as an emulator by connecting your phone to computer with USB.

Additional reading: Signing your applications and How to enable USB debugging on your Android phone

evilone
  • 22,410
  • 7
  • 80
  • 107
1

Once you run it on your android emulator it will automatically converted to .apk

Harry Joy
  • 58,650
  • 30
  • 162
  • 207