Qt5.2-Beta:error occured when i launch an audio player DEMO on my android device



  • Hi everybody,

    I just installed the latest 5.2.0 beta 1, try the multimedia support for android.
    here is what I’ve done:

    1)set up a project using Qt widgets application and a very simple example which from Qt assistant:
    Qt 5.2>Qt Multimedia>Audio Devices Example

    2)it was successfully built and deployed on my HTC phone.

    3)but,when the Qt Creator launch the remote application,the exception occured:
    @
    D/dalvikvm( 3907): Trying to load lib /data/data/org.qtproject.example.audiodevices/lib/libgnustl_shared.so 0x40d77360
    D/dalvikvm( 3907): Added shared lib /data/data/org.qtproject.example.audiodevices/lib/libgnustl_shared.so 0x40d77360
    D/dalvikvm( 3907): No JNI_OnLoad found in /data/data/org.qtproject.example.audiodevices/lib/libgnustl_shared.so 0x40d77360, skipping init
    D/dalvikvm( 3907): Trying to load lib /data/data/org.qtproject.example.audiodevices/lib/libQt5Core.so 0x40d77360
    D/dalvikvm( 3907): Added shared lib /data/data/org.qtproject.example.audiodevices/lib/libQt5Core.so 0x40d77360
    D/dalvikvm( 3907): Trying to load lib /data/data/org.qtproject.example.audiodevices/lib/libQt5Gui.so 0x40d77360
    D/dalvikvm( 3907): Added shared lib /data/data/org.qtproject.example.audiodevices/lib/libQt5Gui.so 0x40d77360
    D/dalvikvm( 3907): No JNI_OnLoad found in /data/data/org.qtproject.example.audiodevices/lib/libQt5Gui.so 0x40d77360, skipping init
    D/dalvikvm( 3907): Trying to load lib /data/data/org.qtproject.example.audiodevices/lib/libQt5Network.so 0x40d77360
    D/dalvikvm( 3907): Added shared lib /data/data/org.qtproject.example.audiodevices/lib/libQt5Network.so 0x40d77360
    I/Qt ( 3907): Network start
    D/dalvikvm( 3907): Trying to load lib /data/data/org.qtproject.example.audiodevices/lib/libQt5Multimedia.so 0x40d77360
    D/dalvikvm( 3907): Added shared lib /data/data/org.qtproject.example.audiodevices/lib/libQt5Multimedia.so 0x40d77360
    D/dalvikvm( 3907): No JNI_OnLoad found in /data/data/org.qtproject.example.audiodevices/lib/libQt5Multimedia.so 0x40d77360, skipping init
    D/dalvikvm( 3907): Trying to load lib /data/data/org.qtproject.example.audiodevices/lib/libQt5MultimediaQuick_p.so 0x40d77360
    W/System.err( 3907): java.lang.reflect.InvocationTargetException
    W/System.err( 3907): at java.lang.reflect.Method.invokeNative(Native Method)
    W/System.err( 3907): at java.lang.reflect.Method.invoke(Method.java:511)
    W/System.err( 3907): at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:202)
    W/System.err( 3907): at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:495)
    W/System.err( 3907): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:700)
    W/System.err( 3907): at android.app.Activity.performCreate(Activity.java:4531)
    W/System.err( 3907): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
    W/System.err( 3907): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150)
    W/System.err( 3907): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229)
    W/System.err( 3907): at android.app.ActivityThread.access$600(ActivityThread.java:139)
    W/System.err( 3907): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
    W/System.err( 3907): at android.os.Handler.dispatchMessage(Handler.java:99)
    W/System.err( 3907): at android.os.Looper.loop(Looper.java:154)
    W/System.err( 3907): at android.app.ActivityThread.main(ActivityThread.java:4945)
    W/System.err( 3907): at java.lang.reflect.Method.invokeNative(Native Method)
    W/System.err( 3907): at java.lang.reflect.Method.invoke(Method.java:511)
    W/System.err( 3907): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    W/System.err( 3907): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    W/System.err( 3907): at dalvik.system.NativeStart.main(Native Method)
    W/System.err( 3907): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1941]: 1455 could not load needed library 'libQt5Quick.so' for 'libQt5MultimediaQuick_p.so' (load_library[1096]: Library 'libQt5Quick.so' not found)
    W/System.err( 3907): at java.lang.Runtime.load(Runtime.java:340)
    W/System.err( 3907): at java.lang.System.load(System.java:521)
    W/System.err( 3907): at org.qtproject.qt5.android.QtNative.loadQtLibraries(QtNative.java:128)
    W/System.err( 3907): at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:335)
    W/System.err( 3907): ... 19 more
    ......
    @

    4)i try to add settings to audiodevices.pro as follow:
    QT += quick
    QT += multimedia
    QT += multimediawidgets
    it does not work!

    1. at the time, I build a "hello,world!"project and deploy it on my phone.it works well!

    6)the exception will occur,when i add the content to my project as follow:
    QT += multimedia => helloworld.pro
    #include <QAudioInput> => helloworld.h

    Just wondering if anyone else ran into the same issues :

    W/System.err( 3907): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1941]: 1455 could not load needed library 'libQt5Quick.so' for 'libQt5MultimediaQuick_p.so' (load_library[1096]: Library 'libQt5Quick.so' not found)

    Thanks in advance.

    ps:
    actually, the Qt5Quick lib was linked!
    F:\Qt_for_android\android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/bin/arm-linux-androideabi-g++ ....
    -lQt5Quick -lQt5Multimedia -lQt5Qml -ldl -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc



  • I got this error too.
    I resolved in this way:

    • clean everything of previous builds
    • add (even if you don't need) QT += qml quick widgets (and of course the things you need)
    • redo qmake
    • build again and deploy.


  • Thanks a lot,it works well as you say!
    but the following issue occured again:
    No audio devices available on Android !!
    http://qt-project.org/forums/viewthread/28236/

    [quote author="Gianluca" date="1382715027"]I got this error too.
    I resolved in this way:

    • clean everything of previous builds
    • add (even if you don't need) QT += qml quick widgets (and of course the things you need)
    • redo qmake
    • build again and deploy.
      [/quote]

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.