Skip to content

Processing – Android – Ubuntu 12.04

31. October 2012

I had some problems on compiling Android (4.1.2 API 16) apps with Processing (2.0b5) on my Ubuntu 12.04.

–> using latest android and processing versions…should be the best idea, right?!?

I always got the error message, saying something like:

BUILD FAILED
...\android-sdk\tools\ant\build.xml:518: 
Unable to resolve project target 'android-10'

After, having no idea and long searching what kind of problem this error belongs to I found that discussion and they found the solution.

My beloved processing expects me to provide just android 2.3.3 with API level 10…such an “old” version…I would have never expected that 😉

Android SDK Tools Revision 20.0.3
Installed at .../android-sdk-linux
Project Type: Application
Project Target:   Android 2.3.3
API level:        10
Library dependencies:
No Libraries

So…just install android version 2.3.3 and API level 10 and you will see the output message as above!!!
Then really running an application was really tricky:

First run started… that defined a new AVD (Processing-0206 … even though I working with 1.0b5;-)?!?) …started it…and the session broke on any point. Then I just started the AVD from the manager…waited until it was loaded completely…unlocked the screen…and then I ran the application. That worked finally!!!

When I’m working now with this installed setup I always firstly start the AVD (wait until loading is completed) and than run the application.  But when you run your setup the first time you should initialize it from processing… by that it defines a new AVD with the needed parameters!

!!!Always remember that you cannot just hit the “Run”-button, as this wants to start your app on a device. When you want to use an emulator, you have to select “Sketch/Run on Emulator…” or press Ctrl+Shift+R.

Otherwise you may get an error that ends with:

Running zip align on final apk...
Shutting down any existing adb server...

Links:
http://processing.org/learning/android/
https://forum.processing.org/topic/error-in-first-time-android-mode
https://forum.processing.org/topic/impossible-to-connect-with-emulator

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: