خرید بک لینک

Vote count: 0

I would like to use libvlc with an Android QT application, but the application always crash at startup.

To ensure that it isn't a compile problem, I've copied the libvlcjni.so from this project: https://github.com/mzafers/QtVlcMediaPlayer, but continue with the same problem, the application crash at startup. Also too with the libvlcjni.so that is inside the official vlc APK.

Finally, I've done a dummy project, with only the default Quick QML Project, and only added the library with ANDROID_EXTRA_LIBS, but the same occurs:

main.cpp:

#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
   QGuiApplication app(argc, argv);
   QQmlApplicationEngine engine;
   engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
   retu app.exec();
}

main.qml:

    import QtQuick 2.4
    import QtQuick.Controls 1.3

    ApplicationWindow {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")

        menuBar: MenuBar {
            Menu {
                title: qsTr("File")
                MenuItem {
                    text: qsTr("&Open")
                    onTriggered: console.log("Open action triggered");
                }
                MenuItem {
                    text: qsTr("Exit")
                    onTriggered: Qt.quit();
                }
            }
        }

        Label {
            text: qsTr("Hello World")
            anchors.centerIn: parent
        }
    }

TestLibVLC.pro:

    TEMPLATE = app
    QT += qml quick
    CONFIG += c++14
    SOURCES += main.cpp
    RESOURCES += qml.qrc
    QML_IMPORT_PATH =
    include(deployment.pri)
    VLCLIB_PATH = D:/libs/VLC
    contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
        ANDROID_EXTRA_LIBS = 
            $${VLCLIB_PATH}/android/armeabi-v7a/libvlcjni.so
    }

Any idea?

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 15 فروردين 1395 ساعت: 5:49

صفحه بندی