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

问题描述 投票:1回答:2

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

当我为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位android模拟器上运行64位应用程序?我可以尝试进一步分析此问题吗?

更新1

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

中止。不兼容的处理器:缺少功能0x60-sse4.1。

android qt android-emulator 64-bit x86-64
2个回答
0
投票

您是否有android 64套件并尝试使用它进行构建?


0
投票

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

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

© www.soinside.com 2019 - 2024. All rights reserved.