Android 上的 Qt3D

Qt3D on Android

是否可以在 android 上使用纯 C++ 运行 Qt 3D?所有 C++ 示例,如基本形状 C++ 示例,在 .pro 文件中获得此条目:

android|ios|tvos|winrt {
warning( "This example is not supported for android, ios, tvos, or winrt." )
}

我编写了一个与示例非常相似但更小的应用程序。它只是一个具有一个实体和一些组件的 Qt3DWindow。它适用于我的笔记本电脑 (Windows 8.1) 但它在我的 AVD 上崩溃了。
我尝试了一些 Nexus 和 Pixel AVD,其 API 从 23 到 25 不等,带有软件和硬件图形渲染。

我按照 this 指南设置了 QtCreator 2.3.0,我使用的是 Qt 5.9.0-X86-rc。所有 android 个例子都 运行 没问题。

这是应用程序输出:

I art : Not late-enabling -Xcheck:jni (already on)
W System : ClassLoader referenced unknown path:
I QtCore : Start
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Gui.so: unused DT entry: type 0x1d arg 0x53bd4
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Gui.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Network.so: unused DT entry: type 0x1d arg 0x13595
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Network.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DCore.so: unused DT entry: type 0x1d arg 0xd8b1
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DCore.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Concurrent.so: unused DT entry: type 0x1d arg 0xbb2
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Concurrent.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DRender.so: unused DT entry: type 0x1d arg 0x2a36b
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DRender.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Gamepad.so: unused DT entry: type 0x1d arg 0x2f36
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Gamepad.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DInput.so: unused DT entry: type 0x1d arg 0xadb2
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DInput.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DLogic.so: unused DT entry: type 0x1d arg 0x19c4
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DLogic.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DExtras.so: unused DT entry: type 0x1d arg 0x11617
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt53DExtras.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Widgets.so: unused DT entry: type 0x1d arg 0x6bf99
W linker : /data/app/org.qtproject.example-2/lib/x86/libQt5Widgets.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unused DT entry: type 0x1d arg 0x8747
W linker : /data/data/org.qtproject.example/qt-reserved-files/plugins/platforms/android/libqtforandroid.so: unsupported flags DT_FLAGS_1=0x81
I Qt : qt start
W linker : /data/data/org.qtproject.example/qt-reserved-files/plugins/bearer/libqandroidbearer.so: unused DT entry: type 0x1d arg 0x16dd
W linker : /data/data/org.qtproject.example/qt-reserved-files/plugins/bearer/libqandroidbearer.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/data/org.qtproject.example/qt-reserved-files/plugins/gamepads/libandroidgamepad.so: unused DT entry: type 0x1d arg 0x1223
W linker : /data/data/org.qtproject.example/qt-reserved-files/plugins/gamepads/libandroidgamepad.so: unsupported flags DT_FLAGS_1=0x81
W linker : /data/app/org.qtproject.example-2/lib/x86/libandroid_test.so: unused DT entry: type 0x1d arg 0x6f6
D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
D : HostConnection::get() New Host Connection established 0xaa93bd80, tid 5833
D : HostConnection::get() New Host Connection established 0xaa93bf80, tid 5854
I OpenGLRenderer: Initialized EGL, version 1.4
W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
W linker : /data/data/org.qtproject.example/qt-reserved-files/plugins/sceneparsers/libgltfsceneimport.so: unused DT entry: type 0x1d arg 0x3816
W linker : /data/data/org.qtproject.example/qt-reserved-files/plugins/sceneparsers/libgltfsceneimport.so: unsupported flags DT_FLAGS_1=0x81
D : HostConnection::get() New Host Connection established 0x9ed4a8c0, tid 5862
D : HostConnection::get() New Host Connection established 0xaa305c00, tid 5855
F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 5862 (QtThread)
"org.qtproject.example" died.

我能够在物理设备上部署该应用程序。似乎是(我的)AVD 的问题。