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 ****
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…
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.
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}