How do I install a platform into my android device?
I downloaded the emulator and followed 开发者_JAVA技巧the steps on the android website on how to install the SDK. i made an AVD and everything showed up on my computer screen perfectly, but now the problem was installing it to my phone. i can't find the instructions the android website on how to install it on my device.
If you're using the ADT Plugin for Eclipse, it's totally seamless. Just connect your Android device to your computer like normal and mount it. Then in Eclipse, right click your Android project, and say Run As -> Android Application. It will actually run the app on your device.
And if you unplug the phone and run the project again through Eclipse, then it runs inside the emulator. It just works. =)
run this console command:
adb -d install -r /path/to/your.apk
or windows version:
adb -d install -r c:\path\to\your.apk
As Drew said - if you're using Eclipse on the PC, then it's just a case of plugging in your phone and running the app from within Eclipse. There are just two things you might need to do:
- On your phone, go to settings -> applications -> development -> "enable USB debugging" and also "allow unknown sources"
- If you've got both the emulator running and the phone plugged in at the same time, you will have to change the project run properties to "manually select the target device". Otherwise it might try to install the app on the wrong one.
You don't need to install the SDK or anything like that on your phone. From your phone's point of view, it's just running an application like any other, since Eclipse (well ADB really) fully installs the app onto your phone when you test it.
精彩评论