Android Adventures, part 8: On a Mac?
I started using Apple’s back in the early 80’s: Staying up late at my friends house playing Wizardry (1) on his Apple ][+ in ’81 was a great time. My family picked up an Apple ][c in the mid 80’s which lasted for many years. But by the late 80’s we jumped on the PC bandwagon, and it was a steady stream of 286’s, 386’s, 486’s, Pentium’s, etc,… up until today where I’ve had a Dell laptop for the past six years. It treated me well, but has been showing it’s age.
Time to get a new laptop. Doing my research, I learned the majority of the tech-friends I respect all vote for Mac. Mac?
Long story short: Now have a nice new shiny Macbook Air. Easily portable, solid state drives, and feels nice in your hand. Time to get software!
Below is the process I went through getting the Android SDK on the machine, getting ‘Processing for Android’ on it, and all the confusion that went on in-between considering I’m a complete mac noob. This is actually very similar to “Android Adventures, part 2” where I configured everything on my PC, but with some twists.
A. Install Software to get ‘Processing for Android’ working:
- Per the instructions on the ‘Processing for Android’ page, I installed:
- The Java Development Kit. Wait, no I didn’t. The mac comes pre-loaded with that. Of course I didn’t know that and took me an hour or so to grasp it. It also comes pre-loaded with Python, Ruby, and many other things. My PC didn’t come with any of that….
- Downloaded Android SDK for mac, and installed it. Since this wasn’t a .dmg, but a zipped dir, I had to do research on where to put it. Ultimately I renamed the folder it came in and:
- Stuck it here /Users/ak_eric/Documents/android-sdk
- Had to edit my ~/.bash_profile adding these two lines: (there was already an export line for the PATH)
- export ANDROID_SDK=/Users/ak_eric/Documents/android-sdk
- Download ‘Android for Processing’ for the mac. This is where everything really went wrong:
- My Android phone is still on os 2.1, which runs the SDK 7 tools. Reading the download notes, it looked like to me I needed to download ‘Processing for Android’ revision 0191, since that seemed to mesh with SDK 7. As it turns out, no, I was wrong, I needed to download the latest version. After that everything started working. But it took me several days of trial and error to figure this out. You can see the forum thread on the subject here.
B. Try out some code:
- I’d already brought over all my old processing sketches. During my ‘trial and error’ period mentioned above trying to get Processing for Android working, I downloaded the adbWireless app (which I blogged about previously). I now use that exclusively to send my Processing for Android apps over to the phone, works great. No more zany USB configuring for me!
So while it did take me quite a few days to get the whole thing working, it was mainly due to my lack of knowledge of the mac, and failing to install the latest software. So far the Macbook Air has been a great reintroduction to the world of Apple, I just hope it lasts as long as my Dell 😛