No joy so far. I can compile the android port without problems and I can run all the samples that come with the NDK on an AVD and on my phone but I cannot run the sample that comes with the android_and_IOS port. When I try to run it on either an AVD or on my real Nexus 4 it starts and then says "Unfortunately, SFML has stopped."
Building the project seems to work fine. Here is the output from ~/android-ndk-r9/ndk-build:
Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
Gdbserver : [arm-linux-androideabi-4.6] libs/armeabi-v7a/gdbserver
Gdbsetup : libs/armeabi-v7a/gdb.setup
Install : libsfml-activity.so => libs/armeabi-v7a/libsfml-activity.so
Install : libsfml-example.so => libs/armeabi-v7a/libsfml-example.so
Install : libsfml-system.so => libs/armeabi-v7a/libsfml-system.so
Install : libsfml-window.so => libs/armeabi-v7a/libsfml-window.so
Install : libsfml-graphics.so => libs/armeabi-v7a/libsfml-graphics.so
Install : libsfml-audio.so => libs/armeabi-v7a/libsfml-audio.so
Install : libsfml-network.so => libs/armeabi-v7a/libsfml-network.so
Install : libstlport_shared.so => libs/armeabi-v7a/libstlport_shared.so
Install : libopenal.so => libs/armeabi-v7a/libopenal.so
Install : libsndfile.so => libs/armeabi-v7a/libsndfile.so
Here are what I think are the relevant log messages when it crashes:
02-02 16:30:52.743: I/ActivityManager(601): Start proc com.example.sfml for activity com.example.sfml/android.app.NativeActivity: pid=22731 uid=10155 gids={50155}
02-02 16:30:52.763: I/SearchController(24544): #onHotwordDetectorStopped
02-02 16:30:52.763: I/MicrophoneInputStream(24544): mic_close
02-02 16:30:52.773: D/dalvikvm(826): GC_CONCURRENT freed 495K, 6% free 9518K/10080K, paused 2ms+1ms, total 15ms
02-02 16:30:52.843: D/dalvikvm(24544): threadid=49: thread exiting, not yet detached (count=0)
02-02 16:30:52.843: D/dalvikvm(24544): threadid=37: thread exiting, not yet detached (count=0)
02-02 16:30:52.893: I/Adreno-EGL(22731): <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
02-02 16:30:52.914: D/dalvikvm(826): GC_CONCURRENT freed 388K, 6% free 9515K/10080K, paused 1ms+1ms, total 14ms
02-02 16:30:53.084: D/dalvikvm(826): GC_CONCURRENT freed 483K, 6% free 9520K/10080K, paused 2ms+2ms, total 21ms
02-02 16:30:53.444: A/libc(22731): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 22748 (om.example.sfml)
02-02 16:30:53.504: I/DEBUG(171): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-02 16:30:53.504: I/DEBUG(171): Build fingerprint: 'google/occam/mako:4.4.2/KOT49H/937116:user/release-keys'
02-02 16:30:53.504: I/DEBUG(171): Revision: '10'
02-02 16:30:53.504: I/DEBUG(171): pid: 22731, tid: 22748, name: om.example.sfml >>> com.example.sfml <<<
02-02 16:30:53.504: I/DEBUG(171): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
and the backtrace:
02-02 16:30:53.654: I/DEBUG(171): backtrace:
02-02 16:30:53.664: I/DEBUG(171): #00 pc 00000000 <unknown>
02-02 16:30:53.664: I/DEBUG(171): #01 pc 000417a3 /system/lib/egl/libGLESv2_adreno.so (glGetString+16)
02-02 16:30:53.664: I/DEBUG(171): #02 pc 0001c909 /system/lib/egl/libGLESv1_CM_adreno.so (Load_Gll_2_0+984)
02-02 16:30:53.664: I/DEBUG(171): #03 pc 00021d03 /system/lib/egl/libGLESv1_CM_adreno.so (gliMakeCurrent+18)
02-02 16:30:53.664: I/DEBUG(171): #04 pc 00024d89 /system/lib/egl/libGLESv1_CM_adreno.so (oglSetBuffers+48)
02-02 16:30:53.664: I/DEBUG(171): #05 pc 0001c7f4 /system/lib/egl/libEGL_adreno.so (eglGLUpdateSurfaces+648)
02-02 16:30:53.664: I/DEBUG(171): #06 pc 00010b50 /system/lib/egl/libEGL_adreno.so (qeglDrvAPI_eglMakeCurrent+628)
02-02 16:30:53.664: I/DEBUG(171): #07 pc 00006b0c /system/lib/egl/libEGL_adreno.so (eglMakeCurrent+16)
02-02 16:30:53.664: I/DEBUG(171): #08 pc 0000d3e5 /system/lib/libEGL.so (android::egl_display_t::makeCurrent(android::egl_context_t*, android::egl_context_t*, void*, void*, void*, void*, void*, void*)+84)
I have tried it using API Level 17, 18 and 19 on AVD's.
I am using ndk-r9 per the post by sonkun at November 29, 2013, 05:18:00 PM
I believe I configured cmake properly, but I attached a screenshot of my cmake-gui configuration.