gpt4 book ai didi

android - 无法在模拟器中启动 64 位(x86_64)android qt 应用程序

转载 作者:行者123 更新时间:2023-11-30 04:56:47 24 4
gpt4 key购买 nike

我正在尝试在 x86_64 Android 模拟器(Intel x86 Atom_64 系统镜像 - system-images;android-28;default;x86_64)上运行 QtCreator 中的 HelloWorld 示例(即 Qt Quick Application - 空)。

当我为 x86(32 位)构建 HelloWorld 示例时,一切正常。但是,当我为 x86_64(64 位)编译它时,应用程序将无法启动。仅显示初始屏幕,即白色背景和包含文本“HelloWorld”的黑色标题栏。

adb logcat 的输出(64 位版本):

11-21 17:51:45.016  2018  2936 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.qtproject.example.HelloWorld/org.qtproject.qt5.android.bindings.QtActivity bnds=[87,115][160,198]} from uid 10031
11-21 17:51:45.021 1830 3007 W audio_hw_generic: Not supplying enough data to HAL, expected position 3189792 , only wrote 3189600
11-21 17:51:45.036 5087 5087 I mple.HelloWorl: Not late-enabling -Xcheck:jni (already on)
11-21 17:51:45.044 2018 2057 I ActivityManager: Start proc 5087:org.qtproject.example.HelloWorld/u0a68 for activity org.qtproject.example.HelloWorld/org.qtproject.qt5.android.bindings.QtActivity
11-21 17:51:45.052 5087 5087 W mple.HelloWorl: Unexpected CPU variant for X86 using defaults: x86_64
11-21 17:51:45.061 1559 1615 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 618496
11-21 17:51:45.131 5087 5087 W System : ClassLoader referenced unknown path:
11-21 17:51:45.157 5087 5087 D OpenGLRenderer: Skia GL Pipeline
*11-21 17:51:45.170 5087 5104 I QtCore : Start
11-21 17:51:45.172 1830 3007 W audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
11-21 17:51:45.217 1830 3007 I chatty : uid=1041(audioserver) writer identical 3 lines
11-21 17:51:45.322 1830 3007 W audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
11-21 17:51:45.586 1840 2543 W SurfaceFlinger: Attempting to set client state on removed layer: Surface(name=AppWindowToken{f3935a3 token=Token{f1170d2 ActivityRecord{4abef5d u0 org.qtproject.example.HelloWorld/org.qtproject.qt5.android.bindings.QtActivity t41}}})/@0xb00bcf6 - animation-leash#0
11-21 17:51:45.586 1840 2543 W SurfaceFlinger: Attempting to set client state on removed layer: Surface(name=AppWindowToken{3fc725e token=Token{5fb0f99 ActivityRecord{36740e0 u0 com.android.launcher3/.Launcher t2}}})/@0xafd9a43 - animation-leash#0
11-21 17:51:45.586 1840 2543 W SurfaceFlinger: Attempting to destroy on removed layer: Surface(name=AppWindowToken{f3935a3 token=Token{f1170d2 ActivityRecord{4abef5d u0 org.qtproject.example.HelloWorld/org.qtproject.qt5.android.bindings.QtActivity t41}}})/@0xb00bcf6 - animation-leash#0
11-21 17:51:45.586 1840 2543 W SurfaceFlinger: Attempting to destroy on removed layer: Surface(name=AppWindowToken{3fc725e token=Token{5fb0f99 ActivityRecord{36740e0 u0 com.android.launcher3/.Launcher t2}}})/@0xafd9a43 - animation-leash#0
11-21 17:51:45.604 2623 2711 D EGL_emulation: eglMakeCurrent: 0x7f2097cbac60: ver 3 0 (tinfo 0x7f2097d27040)
11-21 17:51:48.217 1830 1862 W audio_hw_generic: Not supplying enough data to HAL, expected position 3494523 , only wrote 3342960
11-21 17:51:55.030 2018 2055 W ActivityManager: Launch timeout has expired, giving up wake lock!
11-21 17:51:55.082 2018 2054 E memtrack: Couldn't load memtrack module
11-21 17:51:55.082 2018 2054 W android.os.Debug: failed to get memory consumption info: -1

adb logcat 的输出(32 位版本):

11-21 17:54:20.364  2018  3148 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.qtproject.example.HelloWorld/org.qtproject.qt5.android.bindings.QtActivity bnds=[87,115][160,198]} from uid 10031
11-21 17:54:20.369 1830 3007 W audio_hw_generic: Not supplying enough data to HAL, expected position 3343161 , only wrote 3342960
11-21 17:54:20.386 5269 5269 I mple.HelloWorl: Not late-enabling -Xcheck:jni (already on)
11-21 17:54:20.389 2018 2057 I ActivityManager: Start proc 5269:org.qtproject.example.HelloWorld/u0a68 for activity org.qtproject.example.HelloWorld/org.qtproject.qt5.android.bindings.QtActivity
11-21 17:54:20.398 1559 1559 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 618496
11-21 17:54:20.405 5269 5269 W mple.HelloWorl: Unexpected CPU variant for X86 using defaults: x86_64
11-21 17:54:20.479 5269 5269 W System : ClassLoader referenced unknown path:
11-21 17:54:20.500 5269 5269 D OpenGLRenderer: Skia GL Pipeline
*11-21 17:54:20.513 5269 5286 I QtCore : Start
11-21 17:54:20.520 1830 3007 W audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
11-21 17:54:20.536 1830 3007 W audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
*11-21 17:54:20.537 5269 5286 I Qt : qt started
11-21 17:54:20.538 5269 5286 I Qt JAVA : Can't find '/data/data/org.qtproject.example.HelloWorld/qt-reserved-files/lib/libQt5QuickParticles.so'
11-21 17:54:20.550 1830 3007 W audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
11-21 17:54:20.565 1830 3007 W audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
11-21 17:54:20.573 1840 2543 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
11-21 17:54:20.581 1830 3007 W audio_hw_generic: Hardware backing HAL too slow, could only write 0 of 720 frames
11-21 17:54:20.617 1559 1559 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 618496
11-21 17:54:20.619 5269 5287 D : HostConnection::get() New Host Connection established 0xe1ead740, tid 5287
11-21 17:54:20.620 1559 1559 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 618496
11-21 17:54:20.623 1559 1559 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 618496
11-21 17:54:20.627 5269 5287 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
11-21 17:54:20.627 5269 5287 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
11-21 17:54:20.627 5269 5287 I OpenGLRenderer: Initialized EGL, version 1.4
11-21 17:54:20.627 5269 5287 D OpenGLRenderer: Swap behavior 1
11-21 17:54:20.628 5269 5287 W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
11-21 17:54:20.628 5269 5287 D OpenGLRenderer: Swap behavior 0
11-21 17:54:20.633 5269 5287 D EGL_emulation: eglCreateContext: 0xe2085420: maj 3 min 0 rcv 3
11-21 17:54:20.636 5269 5286 D : TEST
11-21 17:54:20.639 5269 5287 D EGL_emulation: eglMakeCurrent: 0xe2085420: ver 3 0 (tinfo 0xe2083680)
11-21 17:54:20.644 1840 2543 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
11-21 17:54:20.664 5269 5287 D EGL_emulation: eglMakeCurrent: 0xe2085420: ver 3 0 (tinfo 0xe2083680)
11-21 17:54:20.703 2018 2067 I ActivityManager: Displayed org.qtproject.example.HelloWorld/org.qtproject.qt5.android.bindings.QtActivity: +326ms
11-21 17:54:20.847 5269 5286 D : HostConnection::get() New Host Connection established 0xe02dbb40, tid 5286
11-21 17:54:20.849 5269 5286 D EGL_emulation: eglCreateContext: 0xe02d1c40: maj 3 min 0 rcv 3
11-21 17:54:20.850 5269 5286 D EGL_emulation: eglMakeCurrent: 0xe02d1c40: ver 3 0 (tinfo 0xdf56f6e0)
11-21 17:54:20.877 1559 1559 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 585728
11-21 17:54:20.878 1840 2486 W SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen org.qtproject.example.HelloWorld#0
11-21 17:54:20.881 1840 2486 W SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen org.qtproject.example.HelloWorld#0
11-21 17:54:20.888 5269 5289 D : HostConnection::get() New Host Connection established 0xe20f7180, tid 5289
11-21 17:54:20.889 5269 5289 D EGL_emulation: eglMakeCurrent: 0xe02d1c40: ver 3 0 (tinfo 0xe2083820)
11-21 17:54:20.938 1559 1559 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 585728
11-21 17:54:20.945 1559 1559 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 585728
11-21 17:54:20.954 1840 2543 W SurfaceFlinger: Attempting to set client state on removed layer: Surface(name=AppWindowToken{dff87f6 token=Token{8dd1c91 ActivityRecord{7b606b8 u0 org.qtproject.example.HelloWorld/org.qtproject.qt5.android.bindings.QtActivity t43}}})/@0xa3d6c85 - animation-leash#0
11-21 17:54:20.954 1840 2543 W SurfaceFlinger: Attempting to set client state on removed layer: Surface(name=AppWindowToken{3fc725e token=Token{5fb0f99 ActivityRecord{36740e0 u0 com.android.launcher3/.Launcher t2}}})/@0xafd9a43 - animation-leash#0
11-21 17:54:20.954 1840 2543 W SurfaceFlinger: Attempting to destroy on removed layer: Surface(name=AppWindowToken{dff87f6 token=Token{8dd1c91 ActivityRecord{7b606b8 u0 org.qtproject.example.HelloWorld/org.qtproject.qt5.android.bindings.QtActivity t43}}})/@0xa3d6c85 - animation-leash#0
11-21 17:54:20.954 1840 2543 W SurfaceFlinger: Attempting to destroy on removed layer: Surface(name=AppWindowToken{3fc725e token=Token{5fb0f99 ActivityRecord{36740e0 u0 com.android.launcher3/.Launcher t2}}})/@0xafd9a43 - animation-leash#0
11-21 17:54:20.976 2623 2711 D EGL_emulation: eglMakeCurrent: 0x7f2097cbac60: ver 3 0 (tinfo 0x7f2097d27040)

两个输出都包含 QtCore : Start(我在行前加上了 *),但 64 位版本不包含 Qt : qt started。所以 Qt/Android 似乎卡在了启动应用程序的某个地方。

如何在 64 位安卓模拟器上运行 64 位应用程序?我可以尝试进一步分析这个问题吗?

更新 1

调试应用程序时,Qt 尝试打印以下错误消息:

Aborted. Incompatible processor: missing feature 0x60 - sse4.1.

最佳答案

解决方法是使用另一个(更好的)模拟器。例如BlueStacks .

请注意,我不会将此答案标记为正确,因为它是一种解决方法,而不是针对所遇到问题的真正解决方案。

关于android - 无法在模拟器中启动 64 位(x86_64)android qt 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58980629/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com