I’m trying to get an SDL2 app working on Android using the NDK. When I try running my app I get an “SDL Error” dialog which contains the same information as the last line in the logcat output below.
05-25 20:50:10.692 32502-32502/org.libsdl.app W/ApplicationPackageManager: getCSCPackageItemText()
05-25 20:50:10.702 32502-32502/org.libsdl.app V/SDL: Device: ks01lte
05-25 20:50:10.702 32502-32502/org.libsdl.app V/SDL: Model: GT-I9506
05-25 20:50:10.702 32502-32502/org.libsdl.app V/SDL: onCreate(): null
05-25 20:50:10.702 32502-32502/org.libsdl.app D/dalvikvm: Trying to load lib /data/app-lib/org.libsdl.app-29/libSDL2.so 0x42a88788
05-25 20:50:10.702 32502-32502/org.libsdl.app D/dalvikvm: Added shared lib /data/app-lib/org.libsdl.app-29/libSDL2.so 0x42a88788
05-25 20:50:10.702 32502-32502/org.libsdl.app W/System.err: Couldn’t load main from loader dalvik.system.PathClassLoader[dexPath=/data/app/org.libsdl.app-29.apk,libraryPath=/data/app-lib/org.libsdl.app-29]: findLibrary returned null
Can somebody please help me understand what is going on and how to fix this? My take on it is that libSDL2.so is the main ‘application’ which tries to libmain.so and its failing. Would that be correct?
I cannot see any other exceptions of stack dumps in my logcat. If I have a simple libmain.so which contains nothing but int main(){ return 0; } I get the same problem.
Any ideas please?