Learning Android: Deploying application to phone from Mac OS X
I’ve been playing around a little bit today with writing an Android application and while for the majority of the time I’ve been deploying to an emulator I wanted to see what it’d look like on my phone.
The developer guide contains all the instructions on how to do this but unfortunately I’m blessed with the ability to skim over instructions which meant that my phone wasn’t getting picked up by the Android Debug Bridge.
We can check which devices have been detected by running the following command from wherever the SDK is installed:
This was initially returning no devices and reading Esau Silva’s blog made me realise that I’d failed to follow this instruction:
On the device, go to Settings > Applications > Development and enable USB debugging (on an Android 4.0 device, the setting is located in Settings > Developer options).
I’d assumed it was only necessary if I wanted to debug the application on my phone but it seems like you need to set it to be able to deploy in the first place.
And now my phone gets picked up and can be deployed to, yay!
/Users/mneedham/github/android/android-sdk-macosx/platform-tools/adb devices List of devices attached 3933C40945FA00EC device
If it still doesn’t work then Esau Silva has some other ideas which I haven’t yet needed to try.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)