qml项目:SIGFPE算术异常

时间:2018-02-27 13:45:17

标签: android qt qml

我在此行上有应用程序崩溃,然后在Android 4.4.2 x86模拟器上运行应用程序:

QQmlApplicationEngine engine;

例外是:SIGFPE Arithmetic exception

emptyQml.pro

QT += qml quick
CONFIG += c++11
SOURCES += main.cpp
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

的main.cpp

#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QGuiApplication app(argc, argv);
    QQmlApplicationEngine engine; // <============================== exception is here
    //engine.load(QUrl(QLatin1String("qrc:/main.qml")));
    return app.exec();
}

这是一个最小的例子。真正的应用程序在Android 4.4.2的客户端设备上崩溃。

在GoolePlay控制台中,有针对Android 4.4的崩溃报告:

java.lang.UnsatisfiedLinkError: 
  at java.lang.Runtime.loadLibrary (Runtime.java:365) 
  at java.lang.System.loadLibrary (System.java:526) 
  at org.qtproject.qt5.android.bindings.QtLoader.loadApplication (QtLoader.java:244) 
  at org.qtproject.qt5.android.bindings.QtLoader.startApp (QtLoader.java:647) 
  at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate (QtActivityLoader.java:181) 
  at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook (QtActivity.java:266) 
  at org.qtproject.qt5.android.bindings.QtActivity.onCreate (QtActivity.java:273) 
  at com.approvalmax.MainActivity.onCreate (MainActivity.java:91) 
  at android.app.Activity.performCreate (Activity.java:5426) 
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1105) 
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2269) 
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2363) 
  at android.app.ActivityThread.access$900 (ActivityThread.java:161) 
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1265) 
  at android.os.Handler.dispatchMessage (Handler.java:102) 
  at android.os.Looper.loop (Looper.java:157) 
  at android.app.ActivityThread.main (ActivityThread.java:5356) 
  at java.lang.reflect.Method.invokeNative (Native Method) 
  at java.lang.reflect.Method.invoke (Method.java:515) 
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1265) 
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1081) 
  at dalvik.system.NativeStart.main (Native Method) 

qt:5.8 ndk:android-ndk-r10e jdk:jdk1.8.0_101 蚂蚁:apache-ant-1.9.7

有什么想法吗?

0 个答案:

没有答案