OF on android

This forum is related to the still in pre-release android version of OF. Please check the instructions on how to install it here:

http://www.openframeworks.cc/setup/android-eclipse

and post if you have any problem.

Hi Arturo,

I had tried a wile back to get this working with no success. I just tried again using the latest git and I’m now running oF on my nook! I had to update everything (ndk,sdk,ant) from my earlier try, but now I’m good to go. Thanks for all of your work on this.

thanks for the feedback, btw, what version of android are you using? there’s people who seem to have trouble with 2.1, and don’t have a device to test it

I’ve got 2.3 on my nook color. I tried to push some apps to my phone, a Samsung Fascinate which is still 2.1 (fuck you verizon) and it fails with the error:
Failure [INSTALL_FAILED_OLDER_SDK]
A quick search told me that this error is because oF is using a newer SDK version than the target device.

thanks! can you try changing this line in AndroidManifest.xml:

<uses-sdk android:minSdkVersion="8" />  

to

<uses-sdk android:minSdkVersion="3" />  

and see if it works

That seemed to help, the app is built and pushed to my phone successfully but it will not run. The same code that works on the nook crashes on launch on my phone. What is a good debugging method for android since we cant see the terminal output?

In Eclipse, choose the DDMS view, and then click the Logcat pannel, you can see the errors thrown by your device by clicking on the little red E in a circle. (if there is nothing there, you must select first your device in the list, on the upper left part of the screen)

It willl probably complain about something it cannot load or something like that

can anyone with a 2.1 device try if changing line 194 of the makefile from:

  
TARGET_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=neon  

to

  
TARGET_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfp  

in the emptyExample works?

The link for the android pre-release on the setup page isn’t working(http://openframeworks.cc/git-pkgs/of-preRelease-v00690-android-FAT.tar.gz) will that be fixed soon or has it been moved?

you need to download from github, there’s no package yet.

Hi Arturo,

I’m having only one issue to run this babe.

  
  
/bin/sh: pkg-config: command not found  
  

So far I couldn’t find a solution to fix that. Everything else seems ok.

  
  
$ pkg-config --version  
0.26  
  

  
  
$ pkg-config --list-all  
gthread-2.0           GThread - Thread support for GLib  
gmodule-2.0           GModule - Dynamic module loader for GLib  
gmodule-export-2.0    GModule - Dynamic module loader for GLib  
zlib                  zlib - zlib compression library  
gobject-2.0           GObject - GLib Type, Object, Parameter and Signal Library  
gio-2.0               GIO - glib I/O library  
gmodule-no-export-2.0 GModule - Dynamic module loader for GLib  
gio-unix-2.0          GIO unix specific APIs - unix specific headers for glib I/O library  
glib-2.0              GLib - C Utility Library  
  

Any thought?

Thanks,

i think you are compiling the linux target, the android one doesn’t use pkg-config at all. Use the arrow next to the build button ( the one with a hammer ) to change the target to android

Oh, good one! Had to remove the build automatically and change the configuration, now I can play.

Thanks mate!

Hi arturo, I am trying to use OF with android but when i import it showing me error in project folder…I posted new question also .can u pls let me know where I am doing any mistake?

thanks

Hi!
I completed all steps, but in the simulator I get the message “The application androidImageExample(process cc.openframeworks)has stopped unexpectedly. Please try again”. I know that this question was asked earlier, but I did not understand how to fix it.
Here what i’ve got in LogCat:

Hi everyone,
I’m a beginner.This is my first time to use openframeworks.
I want to use it on android with eclipes and I follow the guide pagehttp://www.openframeworks.cc/setup/android-eclipse/
But I got some problems.
I use android-ndk-r5b and sdk 10.it’s same as the guide page.

While I compiled the openframeworks,I got the following warning:

Invalid project path: Duplicate path entries found (/openFrameworks [Output path]), path: [/openFrameworks].

After that ,I imported the androidExamples and complied them.
The console displayed the following message:

/home/lucien/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/…/lib/gcc/arm-linux-androideabi/4.4.3/…/…/…/…/arm-linux-androideabi/bin/ld: warning:
libcutils.so, needed by /home/lucien/android-ndk-r5b/platforms/android-8/arch-arm//usr/lib/libGLESv1_CM.so, not found (try using -rpath or -rpath-link)

/home/lucien/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/…/lib/gcc/arm-linux-androideabi/4.4.3/…/…/…/…/arm-linux-androideabi/bin/ld: warning: libEGL.so, needed by /home/lucien/android-ndk-r5b/platforms/android-8/arch-arm//usr/lib/libGLESv1_CM.so, not found (try using -rpath or -rpath-link)

I searched for solutions and I found that somebody said it has be fixed and update to the git.
I downloaded the files from the git and compiled them.But I got the same result.
Does anyone meet these problems?I hope somebody to help me solve these problems.
Thanks a lot.

I also ran into some problems and I’m still trying to sort them out a little bit. After updating to the github version I think you need to switch to android-ndk-r7. You also try with android-10 or android-8 to see if that gives you any better result.

actually the errors you are getting are just warnings and are ok. is the application not working? also ndk-r7 is not going to work better to stick with r6 by now, it seems some symbols where removed and some of the libraries are incompatible with the new release

So I can ignore the path and linking warning,right?
Does anyone have a complete environment setting and run the project successfully?
Would you tell me how to do ,please.

Arturo: are you planning to update OF-Android to n-7? I’ve been playing around with the non-OF android dev on it, but I don’t think there’s a problem with having multiple SDKs though, so I’ll grab n-6 and try again. Also, I’m wondering if it’s possible to move things forward and keep them backwards compatible so that people can get things working with whatever version is most current for their device. I’m still just getting started with this though, so it might be more work than I realize.