Qt Creator 无法确定物理 Android 设备的 CPU 架构

发布于 2025-01-15 14:58:12 字数 2803 浏览 1 评论 0原文

我尝试将 Android 应用程序部署到我的测试设备上,该应用程序在过去运行良好。然而,由于某种原因,Qt Creator 似乎无法确定设备的架构和操作系统信息。我得到的构建错误如下:

22:05:35:部署设备“HTC U12+”不支持该套件使用的架构。 该套件支持“armeabi-v7a”,但设备使用“”。

检查设备设置,我发现操作系统版本和体系结构丢失:

Qt Creator 设备设置显示缺少 Arch 和未知操作系统版本

我尝试过:

  • 重新安装 SDK
  • 删除所有 NDK 并下载 Qt它自己想要的一个
  • 重新安装整个Creator& Qt 设置
  • 重新启动设备
  • 重新启用设备上的调试模式
  • 重新连接设备

我还可以运行 adb.exe -s; shell getprop 并且设备很高兴地提供了我寻找的信息:

[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\

套件设置对我来说也很好:

显示套件详细信息的 Qt Creator 屏幕截图

<一个href="https://i.sstatic.net/S4r7b.png" rel="nofollow noreferrer">Qt Creator 屏幕截图显示Android 设置

我不知道还能尝试什么,任何指示都值得赞赏。

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:

Qt Creator Device settings showing missing Arch and Unknown OS version

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:

Qt Creator screenshot showing the Kit details

Qt Creator screenshot showing the Android setup

I have no idea what else to try, any pointers are apreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜尕妞 2025-01-22 14:58:12

这似乎是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文