Over a million developers have joined DZone.

Learning Android: Deploying application to phone from Mac OS X

DZone's Guide to

Learning Android: Deploying application to phone from Mac OS X

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

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:

/Users/mneedham/github/android/android-sdk-macosx/platform-tools/adb devices

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.


From http://www.markhneedham.com/blog/2011/12/23/learning-android-deploying-application-to-phone-from-mac-os-x/

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. Our APIs verify, standardize, and correct the Big 4 + more – name, email, phone and global addresses – to ensure accurate delivery, prevent blacklisting and identify risks in real-time.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}