Search code examples
androidqtqt-creator

Qt Creator is unable to determine CPU arch for physical android device


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.


Solution

  • 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.