Qt for Android 和 ARCore 应用程序冲突

Qt for Android and ARCore Application Clashes

我正在尝试使用 Qt 为 Android 创建 ARCore 应用程序。

我能够 运行 ARCore 示例(hello_ar_java,hello_ar_c)和 Qt 示例(jnimessenger)。 但是两者一起,它崩溃了。

我从 Qt JNI Messenger Example 开始。 我从 qt 模板目录(~/Qt/5.15.0/android/src/android/templates/build.gradle)添加了 build.gradle。 然后我将 implementation 'com.google.ar:core:1.18.0' 添加到 dependencies.

dependencies {
    implementation 'com.google.ar:core:1.18.0'
    implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
}

但是它因这个错误而崩溃。

I le.jnimessenge: Late-enabling -Xcheck:jni
E le.jnimessenge: Unknown bits set in runtime_flags: 0x8000
W System  : ClassLoader referenced unknown path:
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libc++_shared.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5Core_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5AndroidExtras_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5Gui_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5Network_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5Qml_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5QmlModels_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5Quick_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5QmlWorkerScript_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5QuickTemplates2_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libQt5QuickControls2_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libplugins_platforms_qtforandroid_armeabi-v7a.so'
I Qt JAVA : Can't find '/data/app/org.qtproject.example.jnimessenger-aiGQbBP6wlwSUCHGO1oUDA==/lib/arm64/libplugins_bearer_qandroidbearer_armeabi-v7a.so'
W System.err: java.lang.Exception:
W System.err:   at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:268)
W System.err:   at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:505)
W System.err:   at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:166)
W System.err:   at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266)
W System.err:   at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273)
W System.err:   at android.app.Activity.performCreate(Activity.java:7825)
W System.err:   at android.app.Activity.performCreate(Activity.java:7814)
W System.err:   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
W System.err:   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
W System.err:   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
W System.err:   at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
W System.err:   at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
W System.err:   at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
W System.err:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
W System.err:   at android.os.Handler.dispatchMessage(Handler.java:107)
W System.err:   at android.os.Looper.loop(Looper.java:214)
W System.err:   at android.app.ActivityThread.main(ActivityThread.java:7356)
W System.err:   at java.lang.reflect.Method.invoke(Native Method)
W System.err:   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
W System.err:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
I Adreno  : QUALCOMM build                   : 4a00b69, I4e7e888065
I Adreno  : Build Date                       : 04/09/19
I Adreno  : OpenGL ES Shader Compiler Version: EV031.26.06.00
I Adreno  : Local Branch                     :
I Adreno  : Remote Branch                    :
I Adreno  : Remote Branch                    :
I Adreno  : Reconstruct Branch               :
I Adreno  : Build Config                     : S P 8.0.6 AArch64
I Adreno  : PFP: 0x016ee183, ME: 0x00000000
W Gralloc3: mapper 3.x is not supported

我想知道为什么这种依赖会破坏最初工作的 Qt。(我是 Android 的初学者。)

我是不是做错了什么? 有没有办法同时使用 Qt 和 ARCore?

感谢您的帮助!

我不懂逻辑,但是我已经解决了问题。

我选择了arm64-v8a。 (项目>构建步骤>ABI)