Setting up for Android Development (MAC)

July 20th, 2010

So you want to do develop for Android. Let’s go through how to set up the SDK and such real fast.

1. DL and set up the Android SDK as described here. This doesn’t take too long. Just make sure you follow all the steps.

2. Set up your PATH. On Mac, open Terminal (make sure you’re in your parent directory, eg ~) and type open -e .bash_profile. TextEdit will open with blank .bash_profile doc.

When TextEdit opens add export PATH=${PATH}:/Your/AndroidSDK/dirs/here/

Save and quit.

This information will come in handy when “other” SDKs become publicly available. You can just add the other SDK’s directories here.

3. Now you have full access to Android SDK. So if you ever need to use it just type adb … in Terminal.

4. Test this. Plug in your device and in Terminal type: adb devices. The Daemon should run and your devices plugged in should show up.

Now you can install apps. For instance, let’s say we want to install myfungame.apk that sits on your desktop on to your device.

1. With the device plugged in. Open Terminal and cd to your desktop. Here’s what mine looks like:

2. Type in adb install myfungame.apk

3. Terminal will run and when “Success” appears, your app is finished installing. You can open it on your phone now.

As a note, I put my Android SDK in /HD/Developer/ so that it is central and quick to get to. That “other” SDK is in (added to) the development SDK.

Be sure to read the documentation on the Android Dev site for more of what you can do with the SDK. Or in Terminal type adb help.

Enjoy!

Leave a Reply

Security Code: