[Android] Link Error: SDLActivity.onNativeSurfaceChanged

Hello,

I’m trying to create a very simple Android app by following the steps of the README-android.txt. Everything builds fine, and then I install the bin/SDLActivity-debug-apk (device and simulator). Once the app starts, it crashes shortly after.

With ‘adb logcat’ I found the following failure …

Code:
W/dalvikvm( 734): No implementation found for native Lorg/libsdl/app/SDLActivity;.onNativeSurfaceChanged:()V
D/AndroidRuntime( 734): Shutting down VM
W/dalvikvm( 734): threadid=1: thread exiting with uncaught exception (group=0x41465700)
E/AndroidRuntime( 734): FATAL EXCEPTION: main
E/AndroidRuntime( 734): java.lang.UnsatisfiedLinkError: Native method not found: org.libsdl.app.SDLActivity.onNativeSurfaceChanged:()V

… which seems to miss the method onNativeSurfaceChanged().

I checked the my libraries in libs/armeabis (libSDL2.so + libmain.so) for onNativeSurfaceChanged but it’s not there. Here a shortened log:

Code:
$ nm -D

00038bdd T Java_org_libsdl_app_SDLActivity_nativeLowMemory
00038bfd T Java_org_libsdl_app_SDLActivity_nativePause
00038be9 T Java_org_libsdl_app_SDLActivity_nativeQuit
00038c6d T Java_org_libsdl_app_SDLActivity_nativeResume
00038bc5 T Java_org_libsdl_app_SDLActivity_onNativeAccel
00038ba3 T Java_org_libsdl_app_SDLActivity_onNativeKeyboardFocusLost
00038b8f T Java_org_libsdl_app_SDLActivity_onNativeKeyDown
00038b99 T Java_org_libsdl_app_SDLActivity_onNativeKeyUp
00038b81 T Java_org_libsdl_app_SDLActivity_onNativeResize
00038bab T Java_org_libsdl_app_SDLActivity_onNativeTouch
00038cdd T Java_org_libsdl_app_SDLInputConnection_nativeCommitText
00038d09 T Java_org_libsdl_app_SDLInputConnection_nativeSetComposingText

That’s where I’m lost. Any help is welcome.

thanks

2013/10/1 Laz-Roc

**
Hello,

I’m trying to create a very simple Android app by following the steps of
the README-android.txt. Everything builds fine, and then I install the
bin/SDLActivity-debug-apk (device and simulator). Once the app starts, it
crashes shortly after.

With ‘adb logcat’ I found the following failure …

Code:

W/dalvikvm( 734): No implementation found for native
Lorg/libsdl/app/SDLActivity;.onNativeSurfaceChanged:()V
D/AndroidRuntime( 734): Shutting down VM
W/dalvikvm( 734): threadid=1: thread exiting with uncaught exception
(group=0x41465700)
E/AndroidRuntime( 734): FATAL EXCEPTION: main
E/AndroidRuntime( 734): java.lang.UnsatisfiedLinkError: Native method not
found: org.libsdl.app.SDLActivity.onNativeSurfaceChanged:()V

… which seems to miss the method onNativeSurfaceChanged().

I checked the my libraries in libs/armeabis (libSDL2.so + libmain.so) for
onNativeSurfaceChanged but it’s not there. Here a shortened log:

Code:

$ nm -D

00038bdd T Java_org_libsdl_app_SDLActivity_nativeLowMemory
00038bfd T Java_org_libsdl_app_SDLActivity_nativePause
00038be9 T Java_org_libsdl_app_SDLActivity_nativeQuit
00038c6d T Java_org_libsdl_app_SDLActivity_nativeResume
00038bc5 T Java_org_libsdl_app_SDLActivity_onNativeAccel
00038ba3 T Java_org_libsdl_app_SDLActivity_onNativeKeyboardFocusLost
00038b8f T Java_org_libsdl_app_SDLActivity_onNativeKeyDown
00038b99 T Java_org_libsdl_app_SDLActivity_onNativeKeyUp
00038b81 T Java_org_libsdl_app_SDLActivity_onNativeResize
00038bab T Java_org_libsdl_app_SDLActivity_onNativeTouch
00038cdd T Java_org_libsdl_app_SDLInputConnection_nativeCommitText
00038d09 T Java_org_libsdl_app_SDLInputConnection_nativeSetComposingText

That’s defined here:
http://hg.libsdl.org/SDL/file/4434498bf4b9/src/core/android/SDL_android.c#l151>From the looks of it, you have an outdated file somewhere.


Gabriel.

You’re right. Tried it with the Mercurial snapshot, what solved the link error. Thanks!