无法在emulator中启动64位(x86_64)android qt应用程序
我试图在QtCreator中运行HelloWorld示例,即在x86_64 Android仿真器Intel x86 Atom_64系统映像上运行Qt Quick Application-Empty系统映像;安卓-28;违约x86_64 当我为x86 32位构建HelloWorld示例时,一切都很好。但是,当我为x86_64位编译它时,应用程序将不会启动。仅显示启动屏幕,即白色背景和包含文本HelloWorld的黑色标题栏 64位构建的adb logcat输出:无法在emulator中启动64位(x86_64)android qt应用程序,android,qt,android-emulator,64-bit,x86-64,Android,Qt,Android Emulator,64 Bit,X86 64,我试图在QtCreator中运行HelloWorld示例,即在x86_64 Android仿真器Intel x86 Atom_64系统映像上运行Qt Quick Application-Empty系统映像;安卓-28;违约x86_64 当我为x86 32位构建HelloWorld示例时,一切都很好。但是,当我为x86_64位编译它时,应用程序将不会启动。仅显示启动屏幕,即白色背景和包含文本HelloWorld的黑色标题栏 64位构建的adb logcat输出: 11-21 17:51:45.01
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
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)
32位构建的adb logcat输出:
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
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 Start。因此,Qt/Android似乎在启动应用程序时遇到了麻烦
如何在64位android模拟器上运行64位应用程序?我可以试着进一步分析这个问题吗
更新1
调试应用程序时,Qt试图打印以下错误消息:
流产了。处理器不兼容:缺少功能0x60-sse4.1
你有安卓64套件并尝试使用它构建吗?一个解决办法是使用另一个更好的模拟器。比如说
请注意,我不会将此答案标记为正确答案,因为它是解决遇到问题的一种变通方法,而不是真正的解决方案。也有同样的问题。通过Android Studio将Android Emulator更新为最新版本解决了此问题:工具>SDK管理器>SDK工具>Android Emulator。这看起来像是一条评论,而不是答案。你有足够的代表发表评论。我确实有一个64位的安卓套件,我自己编译的。否则,我将无法在Android 64位仿真器上使用QtCreator运行它。