yglukhov / nimx

GUI library
MIT License
1.1k stars 75 forks source link

Android error libsdl2.so failed to load #361

Closed mrhdias closed 5 years ago

mrhdias commented 5 years ago

The app not works on older android devices. When tested the app I get the following popup error:

SDL Error An error occurred while trying to start the application. Please try again and/or reinstall

Error: Cannot load library: link_image[1892]: 1385 could not load needed library ‘libhidapi.so’ for ‘libSDL2.so’ (load_binary[1094]: Library ‘libhidapi.so’ no found)

The same sdl2 crash reporting: https://discourse.libsdl.org/t/android-error-libsdl2-so-failed-to-load/25680/6

wget https://www.libsdl.org/release/SDL2-2.0.9.tar.gz
tar xvfz SDL2-2.0.9.tar.gz
git clone https://github.com/yglukhov/nimx/
git clone https://github.com/nim-lang/nim
export SDL_HOME=/home/hdias/Downloads/SDL2-2.0.9
export ANDROID_NDK_HOME=/usr/local/programs/x86_64/android/sdk/ndk-bundle
export NIM_HOME=/home/hdias/Downloads/nim/lib
nake droid
BUILD SUCCESSFUL in 18s
29 actionable tasks: 6 executed, 23 up-to-date
Performing Push Install
build/android/com.mycompany.NimxApp/build/outp...ile pushed. 1.7 MB/s (1534234 bytes in 0.878s)
...
:assembleDebug

BUILD SUCCESSFUL in 10s
29 actionable tasks: 6 executed, 23 up-to-date
Performing Push Install
build/android/com.mycompany.NimxApp/build/outp...ile pushed. 2.9 MB/s (1534831 bytes in 0.510s)
    pkg: /data/local/tmp/com.mycompany.NimxApp-debug.apk
Success
rm failed for -f, No such file or director
yglukhov commented 5 years ago

Seems to be fixed in sdl 2.0.10 according to https://discourse.libsdl.org/t/android-error-libsdl2-so-failed-to-load/25680/6. But I never managed to reproduce it with either version.