Openframeworks android Build error on Ubuntu 11.10

Hi guys,
Its been two days and I am still unable to make openframeworks android run on Ubuntu 11.10.

Initially i tried NDK r7 with Android 2.2 API on latest eclipse IDE for C/C++ but unable to make it run because of build errors then I tried NDK r5b with Android 2.2 as mentioned in openframeworks readme but still the same build errors appears. I am in desperate need of help.
n
System Info:
OS: Ubuntu 11.10 64bit
Eclipse IDE for C/C++ linux for 64bit
NDK: r5b
Android SDK: 2.2 API

whenever i try to build openframeworks project, following errors started to appear

**** Build of configuration Android for project openFrameworks ****

make android -C…/openFrameworksCompiled/project/android
make: Entering directory /root/Downloads/of\_preRelease\_v007\_android/libs/openFrameworksCompiled/project/android' make DebugAndroid make[1]: Entering directory/root/Downloads/of_preRelease_v007_android/libs/openFrameworksCompiled/project/android’
/bin/sh: /home/Downloads/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: not found
compiling object for …/…/…/openFrameworks/sound/ofBaseSoundStream.cpp
mkdir -p obj/DebugAndroid/openFrameworks/sound
make[1]: *** [obj/DebugAndroid/openFrameworks/sound/ofBaseSoundStream.o] Error 127
make: *** [android] Error 2
/home/Downloads/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ -g3 -nostdlib --sysroot=/home/Downloads/android-ndk-r5b/platforms/android-8/arch-arm/ -fno-short-enums -I"/home/Downloads/android-ndk-r5b/platforms/android-8/arch-arm/usr/include" -I"/home/Downloads/android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/include/" -I"/home/Downloads/android-ndk-r5b/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include" -DANDROID -Wall -fexceptions -I…/…/…/FreeImage/include -I…/…/…/assimp/include -I…/…/…/assimp/include/Compiler -I…/…/…/cairo/include -I…/…/…/cairo/include/libpng15 -I…/…/…/cairo/include/cairo -I…/…/…/cairo/include/pixman-1 -I…/…/…/freetype/include -I…/…/…/freetype/include/freetype2 -I…/…/…/freetype/include/freetype2/freetype -I…/…/…/freetype/include/freetype2/freetype/internal -I…/…/…/freetype/include/freetype2/freetype/internal/services -I…/…/…/freetype/include/freetype2/freetype/config -I…/…/…/glew/include -I…/…/…/glew/include/GL -I…/…/…/kiss/include -I…/…/…/portaudio/include -I…/…/…/tess2/include -I…/…/…/poco/include -I…/…/…/glu/include_android -I…/…/…/…/addons/ofxAndroid/src -I…/…/…/openFrameworks/ -I…/…/…/openFrameworks/sound -I…/…/…/openFrameworks/graphics -I…/…/…/openFrameworks/communication -I…/…/…/openFrameworks/3d -I…/…/…/openFrameworks/app -I…/…/…/openFrameworks/utils -I…/…/…/openFrameworks/types -I…/…/…/openFrameworks/math -I…/…/…/openFrameworks/video -I…/…/…/openFrameworks/events -I…/…/…/openFrameworks/gl -MMD -MP -MFobj/DebugAndroid/openFrameworks/sound/ofBaseSoundStream.d -MTobj/DebugAndroid/openFrameworks/sound/ofBaseSoundStream.d -o obj/DebugAndroid/openFrameworks/sound/ofBaseSoundStream.o -c …/…/…/openFrameworks/sound/ofBaseSoundStream.cpp
make[1]: Leaving directory /root/Downloads/of\_preRelease\_v007\_android/libs/openFrameworksCompiled/project/android' make: Leaving directory/root/Downloads/of_preRelease_v007_android/libs/openFrameworksCompiled/project/android’

**** Build Finished ****

Something like arm-linux-androideabi-g++: not found is creating problem I think so but when I navigate to that folder that file arm-linux-androideabi-g++ is already there…

Any suggestions??? I installed the openframeworks android according to the steps mentioned on the following link http://www.openframeworks.cc/setup/android-eclipse/

I have the same problem and I finally solved it.
My suggestion is that you check the paths.make file to see if you have set the directories to be right because it is definitely wrong at default. If the directory is correct I think there won’t be a problem. I use NDK r5 and the latest SDK BTW.
I hope that this will help.

Thanks for that, now it is building fine but still am unable to run it on Android virtual device

Here’s my system info:

OS: Ubuntu 11.10
Android API: 2.2
Android NDK: r5b
OF: Downloaded from github

The androidexamples are building fine but still am unable to run them on emulator. For example if I try to run androidPolygonExample it exits with the following error that “the application androidPolygonExample (process cc.openframeworks.androidpolygonexample) has stopped unexpectedly. Please try again.”

Here’s what the error log says:

03-08 00:24:19.986: I/ActivityManager(59): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=cc.openframeworks.androidPolygonExample/.OFActivity }
03-08 00:24:20.056: I/ActivityManager(59): Start proc cc.openframeworks.androidPolygonExample for activity cc.openframeworks.androidPolygonExample/.OFActivity: pid=269 uid=10036 gids={1015}
03-08 00:24:20.236: D/AndroidRuntime(269): Shutting down VM
03-08 00:24:20.236: W/dalvikvm(269): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
03-08 00:24:20.266: E/AndroidRuntime(269): FATAL EXCEPTION: main
03-08 00:24:20.266: E/AndroidRuntime(269): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{cc.openframeworks.androidPolygonExample/cc.openframeworks.androidPolygonExample.OFActivity}: java.lang.ClassNotFoundException: cc.openframeworks.androidPolygonExample.OFActivity in loader dalvik.system.PathClassLoader[/data/app/cc.openframeworks.androidPolygonExample-1.apk]
03-08 00:24:20.266: E/AndroidRuntime(269): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
03-08 00:24:20.266: E/AndroidRuntime(269): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-08 00:24:20.266: E/AndroidRuntime(269): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-08 00:24:20.266: E/AndroidRuntime(269): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-08 00:24:20.266: E/AndroidRuntime(269): at android.os.Handler.dispatchMessage(Handler.java:99)
03-08 00:24:20.266: E/AndroidRuntime(269): at android.os.Looper.loop(Looper.java:123)
03-08 00:24:20.266: E/AndroidRuntime(269): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-08 00:24:20.266: E/AndroidRuntime(269): at java.lang.reflect.Method.invokeNative(Native Method)
03-08 00:24:20.266: E/AndroidRuntime(269): at java.lang.reflect.Method.invoke(Method.java:521)
03-08 00:24:20.266: E/AndroidRuntime(269): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-08 00:24:20.266: E/AndroidRuntime(269): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-08 00:24:20.266: E/AndroidRuntime(269): at dalvik.system.NativeStart.main(Native Method)
03-08 00:24:20.266: E/AndroidRuntime(269): Caused by: java.lang.ClassNotFoundException: cc.openframeworks.androidPolygonExample.OFActivity in loader dalvik.system.PathClassLoader[/data/app/cc.openframeworks.androidPolygonExample-1.apk]
03-08 00:24:20.266: E/AndroidRuntime(269): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
03-08 00:24:20.266: E/AndroidRuntime(269): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
03-08 00:24:20.266: E/AndroidRuntime(269): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
03-08 00:24:20.266: E/AndroidRuntime(269): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
03-08 00:24:20.266: E/AndroidRuntime(269): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
03-08 00:24:20.266: E/AndroidRuntime(269): … 11 more
03-08 00:24:20.285: W/ActivityManager(59): Force finishing activity cc.openframeworks.androidPolygonExample/.OFActivity
03-08 00:24:20.785: W/ActivityManager(59): Activity pause timeout for HistoryRecord{44fb89d0 cc.openframeworks.androidPolygonExample/.OFActivity}