[Interest] Shared library not loading on Android 4.1.x and 4.2.x with Qt 5.4.1

Prashanth Udupa prashanth.udupa at gmail.com
Mon May 11 07:56:09 CEST 2015


Hi All,

I am developing an Android app that makes use of libqrencode library. Its
an LGPL library - so I have to load it dynamically. While I am able to load
the library and run the app on phones with Android 4.4 and 5.0, the
application crashes before loading on 4.1.x, 4.2.x. Maybe even on 4.3 (but
I dont know for sure).

This is what I see as terminal output when the application crashes.

E/AndroidRuntime( 5315): FATAL EXCEPTION: main

E/AndroidRuntime( 5315): java.lang.UnsatisfiedLinkError: Cannot load
library: link_image[1892]: 1724 could not load needed library
'libqrencode.so' for 'libpnu.so' (load_library[1094]: Library
'libqrencode.so' not found)

E/AndroidRuntime( 5315): at java.lang.Runtime.loadLibrary(Runtime.java:370)

E/AndroidRuntime( 5315): at java.lang.System.loadLibrary(System.java:535)

E/AndroidRuntime( 5315): at
org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:252)

E/AndroidRuntime( 5315): at
org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:655)

E/AndroidRuntime( 5315): at
org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:895)

E/AndroidRuntime( 5315): at
android.app.Activity.performCreate(Activity.java:5188)

E/AndroidRuntime( 5315): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)

E/AndroidRuntime( 5315): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)

E/AndroidRuntime( 5315): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)

E/AndroidRuntime( 5315): at
android.app.ActivityThread.access$700(ActivityThread.java:140)

E/AndroidRuntime( 5315): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)

E/AndroidRuntime( 5315): at
android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 5315): at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 5315): at
android.app.ActivityThread.main(ActivityThread.java:4921)

E/AndroidRuntime( 5315): at java.lang.reflect.Method.invokeNative(Native
Method)

E/AndroidRuntime( 5315): at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 5315): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)

E/AndroidRuntime( 5315): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)

E/AndroidRuntime( 5315): at dalvik.system.NativeStart.main(Native Method)

I/Process ( 5315): Sending signal. PID: 5315 SIG: 9

Should I be doing something different on Android 4.1.x and 4.2.x to get
shared library loading to work?

Best Regards,
Prashanth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150511/a7ec3338/attachment.html>


More information about the Interest mailing list