0
我想使用libvlc與Android QT應用程序,但應用程序始終在啓動時崩潰。QT Android應用程序在啓動時崩潰時添加libvlcjni.so
爲了確保它不是編譯問題,我已經從這個項目中複製了libvlcjni.so:https://github.com/mzafers/QtVlcMediaPlayer,但是繼續執行同樣的問題,啓動時應用程序崩潰。同樣在官方vlc APK中的libvlcjni.so也是如此。
最後,我做了一個虛擬的項目,只有默認的快速QML項目,只有用ANDROID_EXTRA_LIBS添加庫,但同樣的情況:
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")));
return 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
}
有什麼想法?
應用程序繼續崩潰 – mabg