Processing for Android: First delve

I’ve delved into Processing for Android, and I decided to post very basic documentation on how I got started. It took a few tumbles, but I’m up and running. There are instructions on the Android for Processing website, but I’ve boiled them down. I worked on a MacBook Pro, so I can only help with that:

  1. Download Android SDK
  2. Download Processing. If you already have it, make sure you have the most recent version.
  3. Put your Android SDK folder in a secure location. And then navigate to that folder > tools. Double-click on “android.” Terminal should run, plus a GUI for the settings window.
  4. In the window, look on the left side. There should be a tab for “Available Packages.” Click the pull-down menu for “Android Repository.” Then check the files for “Android SDK Platform-tools” and “SDK Platform Android 2.1, API 7.” Don’t worry about the revision number.
  5. Click pull-down window for Third-Party > Google. Check “Google APIs by Google Inc., Android API 7.” Don’t worry about revision number.
  6. If you had trouble finding these packages, try clicking the check box next to “Refresh” at the bottom of the page.
  7. Click “Install Selected.” Follow instructions and install.
  8. Now you should be able to go open Processing and, on the top-right window, you should be able to change from “Standard” to “Android.” Once you do that, it’ll ask you to find the SDK. So navigate to the SDK folder and select.
  9.  You’re good to go! … but…

OK, so that’s all good and well. But I had a few hiccups.

When I try to run a sketch, it doesn’t work!

Wait. The Android Emulator needs time to open.

ALSO: If you’re debugging, I strongly recommend connecting your Android phone to your computer and debugging directly on there. It’s much quicker — plus you can see how the touch screen is responding.

But even before that, I recommend building basics of the app in regular Processing — and then moving over to the Android portion and putting in the mobile portions. It’ll save a ton of time.

But it still doesn’t work!

OK, then go back to your SDK folder and open the Android SDK settings window once more. Make sure you downloaded all the packages needed. Sometimes, it doesn’t download the checked packages so you may have to re-download.

The emulator opens, but I can’t run anything!

Try saving your sketch, switching back to “Standard” mode in Processing and switching back to “Android” mode. If that doesn’t work, try closing Processing and re-opening it.

Still no dice…

In Processing/Android mode, there is an Android menu on your taskbar. Click that > Android SDK & AVD Manager. In that window, you should see something that says “Virtual Devices.” Under that tab, delete the running emulator. Just do it.

Grrr. Not working.

Try restarting your computer. Try running sketch. No worky? Try deleting the Android SDK folder and re-downloading everything.

You can also do a Google search of your problem, but most of them will suggest one of the steps above. Once you’re off and running, you can run the sketch in the emulator — or you can run it on your Android phone, and it’s super easy. And awesome. It’ll install the program on there for you!

2 responses to “Processing for Android: First delve”

  1. [Nestless] An app to help homeless

    […] a technical note: I used Processing Android, and had my share of trouble. But if you know Processing, it can be a solid option. To get the touch screen to work properly, I […]

  2. Processing Android with Ushahidi

    […] 2. Create your Processing for Android app: I wrote up a quick post on how to install Processing for Android. […]

Leave a Reply