Qt Creator 无法确定物理 Android 设备的 CPU 架构
我尝试将 Android 应用程序部署到我的测试设备上,该应用程序在过去运行良好。然而,由于某种原因,Qt Creator 似乎无法确定设备的架构和操作系统信息。我得到的构建错误如下:
22:05:35:部署设备“HTC U12+”不支持该套件使用的架构。 该套件支持“armeabi-v7a”,但设备使用“”。
检查设备设置,我发现操作系统版本和体系结构丢失:
我尝试过:
- 重新安装 SDK
- 删除所有 NDK 并下载 Qt它自己想要的一个
- 重新安装整个Creator& Qt 设置
- 重新启动设备
- 重新启用设备上的调试模式
- 重新连接设备
我还可以运行 adb.exe -s
并且设备很高兴地提供了我寻找的信息:
[ro.build.version.release]: [9]
[ro.build.version.sdk]: [28]
[ro.build.version.min_supported_target_sdk]: [17]
[ro.product.cpu.abi]: [arm64-v8a]
[ro.product.cpu.abilist]: [arm64-v8a,armeabi-v7a,armeabi]
[ro.product.cpu.abilist32]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist64]: [arm64-v8a]
以下是已安装的软件包,如 sdkmanager 列出的:
Installed packages:=====================] 100% Computing updates...
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;30.0.2 | 30.0.2 | Android SDK Build-Tools 30.0.2 | build-tools\30.0.2\
build-tools;31.0.0 | 31.0.0 | Android SDK Build-Tools 31 | build-tools\31.0.0\
cmdline-tools;latest | 6.0 | Android SDK Command-line Tools (latest) | cmdline-tools\latest\
extras;google;usb_driver | 13 | Google USB Driver | extras\google\usb_driver\
ndk;21.3.6528147 | 21.3.6528147 | NDK (Side by side) 21.3.6528147 | ndk\21.3.6528147\
ndk;22.1.7171670 | 22.1.7171670 | NDK (Side by side) 22.1.7171670 | ndk\22.1.7171670\
patcher;v4 | 1 | SDK Patch Applier v4 | patcher\v4\
platform-tools | 33.0.1 | Android SDK Platform-Tools | platform-tools\
platforms;android-28 | 6 | Android SDK Platform 28 | platforms\android-28\
platforms;android-31 | 1 | Android SDK Platform 31 | platforms\android-31\
tools | 2.1.0 | Android SDK Tools 2.1 | tools\
套件设置对我来说也很好:
<一个href="https://i.sstatic.net/S4r7b.png" rel="nofollow noreferrer">
我不知道还能尝试什么,任何指示都值得赞赏。
I try to deploy an android app to my test device, which worked great in the past. However, for some reason, Qt Creator seems to be unable to determine the archtecture and OS info for the device. The build error I get is as follows:
22:05:35: The deployment device "HTC U12+" does not support the architectures used by the kit.
The kit supports "armeabi-v7a", but the device uses "".
Checking the device settings, I see, that the OS version and architecture is missing:
I tried:
- Reinstalling the SDK
- Removing all NDK'S and having Qt download whichever one it wanted by itself
- Reinstalling the whole Creator & Qt setup
- Restarting the device
- Re-Enabling the Debugging Mode on the device
- Reconnecting the Device
I can also run adb.exe -s <my device> shell getprop
and the device happily provides the info I look for:
[ro.build.version.release]: [9]
[ro.build.version.sdk]: [28]
[ro.build.version.min_supported_target_sdk]: [17]
[ro.product.cpu.abi]: [arm64-v8a]
[ro.product.cpu.abilist]: [arm64-v8a,armeabi-v7a,armeabi]
[ro.product.cpu.abilist32]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist64]: [arm64-v8a]
Here are the installed packages, as listed by the sdkmanager:
Installed packages:=====================] 100% Computing updates...
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;30.0.2 | 30.0.2 | Android SDK Build-Tools 30.0.2 | build-tools\30.0.2\
build-tools;31.0.0 | 31.0.0 | Android SDK Build-Tools 31 | build-tools\31.0.0\
cmdline-tools;latest | 6.0 | Android SDK Command-line Tools (latest) | cmdline-tools\latest\
extras;google;usb_driver | 13 | Google USB Driver | extras\google\usb_driver\
ndk;21.3.6528147 | 21.3.6528147 | NDK (Side by side) 21.3.6528147 | ndk\21.3.6528147\
ndk;22.1.7171670 | 22.1.7171670 | NDK (Side by side) 22.1.7171670 | ndk\22.1.7171670\
patcher;v4 | 1 | SDK Patch Applier v4 | patcher\v4\
platform-tools | 33.0.1 | Android SDK Platform-Tools | platform-tools\
platforms;android-28 | 6 | Android SDK Platform 28 | platforms\android-28\
platforms;android-31 | 1 | Android SDK Platform 31 | platforms\android-31\
tools | 2.1.0 | Android SDK Tools 2.1 | tools\
The Kit settings look also fine to me:
I have no idea what else to try, any pointers are apreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这似乎是 QtCreator 中的一个错误,大概是 QTCREATORBUG-27103。我将 QtCreator 更新到当前版本 7.0.0-rc1,部署再次正常工作。
截至 23 年 9 月,有报告称在某些设备上的 Qt Creator 11 中再次出现此故障。对上述错误单报告的评论称,回滚到 Qt Creator 8.0.1 似乎有所帮助,但目前没有描述或添加进一步的修复。该票证已重新开放,但目前再次关闭。
This seems to have been a bug in QtCreator, presumably QTCREATORBUG-27103. I updated my QtCreator to the current version 7.0.0-rc1 and deployment works fine again.
As of September '23, there are reports of this failing again in Qt Creator 11 with certain devices. Comments to the above bug ticket report that a rollback to Qt Creator 8.0.1 seems to help, but there's currently no further fix described or added. The ticket was reopened but is currently closed again.