开发者

How to deploy android application to a device?

开发者 https://www.devze.com 2023-01-10 14:15 出处:网络
I developed an application. Now I want to deploy it on real device. Can any body please开发者_高级运维 tell me the steps and the requirements to deploy it on a real device.

I developed an application. Now I want to deploy it on real device. Can any body please开发者_高级运维 tell me the steps and the requirements to deploy it on a real device.

Thanks Deepak


There are multiple ways:

  1. If you don't use eclipse, you can use adb tool. adb -d install PATH_TO_YOUR_APK_FILE
  2. If you use eclipse, you can click run application in eclipse's launch menu. If this doesn't work, make sure you have "USB Debugging Mode" checked on your android phone. It's in the application menu.
  3. You can export your package and sign it! And then browse to it to install.


I just copy the APK for my project out of the /workspace/project/bin folder, and use Dropbox to send it to my device. Then I install the APK from Dropbox client on the device. (No need for cables!)


Hook up your SmartPhone through USB-cable and set your phone i debug mode found in Settings > Applications > Development > USB debugging. Next - run your project in eclipse and chose your device.

make sure 'Run configurations' is set to manual, or this will fail if set to automatic and the target is a emulator. To change this behaviour, go to 'Run > Run configurations > Target' and set 'Deployment Target Selection Mode' to manual. Click 'Close' and try again.


FYI, if you're on a Galaxy Nexus, you need to fish around Samsung's website to find the driver installer. Here it is : http://www.samsung.com/us/support/owners/product/SCH-I515MSAVZW

Note: If you're using adb -d install PATH_TO_YOUR_APK_FILE to install the apk on to your device, you will need to run it from the adt-bundle-[magic]/sdk/platform-tools/ folder.

Better yet, add adb.exe to your $PATH, and you can run adb from your windows command line/ terminal.


Also, you have to set up your system to detect your device.

  • If you're developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.

  • If you're developing on Mac OS X, it just works. Skip this step.

  • If you're developing on Linux see official Android guide here

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号