[SDL] SDL2 Android instant-errors on startup

Gabriel Jacobo gabomdq at gmail.com
Wed Feb 8 15:50:24 PST 2012

> I did so before adding the Application.mk, and now tried again. I edited
> android-project/src/org/libsdl/app/SDLActivity.java and added a loadLibrary
> call for stlport_shared at line 49 before SDL2 is loaded.
> However, same as before, it still wants to load SDL2 first for some weird
> reason I do not understand and ends up with the same backtrace:

I think you need to break the dependency that libSDL2.so has on

objdump  -x libSDL2.so | grep NEEDED
  NEEDED               libstlport_shared.so
  NEEDED               libdl.so
  NEEDED               libGLESv1_CM.so
  NEEDED               libGLESv2.so
  NEEDED               liblog.so
  NEEDED               libstdc++.so
  NEEDED               libm.so
  NEEDED               libc.sof

This dependency makes Android try to load libstlport_shared.so from
the SYSTEM paths along with the other system libraries, so it fails
(despite the fact that you are loading libstlport_shared by hand
previously, Android probably thinks this is a different library). I've
looked at your project files but I couldn't figure out a simple way to
break this dependency, you'll have to investigate further or perhaps
someone here already knows the answer.


More information about the SDL mailing list