Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
Qt Creator 15.0.1, Qt Creator 16.0.0
-
None
-
Ubuntu 22.04, Qt 6.10.0 (dev).
Windows 11 (version 10), QT 6.8.1
-
-
2025wk22s1-2QtforAndroid
Description
I have installed SDKs 23, 26-31, 33-35 with Qt Creator's SDK Manager.
I have built Qt for Android locally, and this kit is automatically found by Qt Creator as "Android Qt 6.10.0 (qt6-build-android-install) Clang x86_64".
During the Qt build, API level 28 is used by default:
– Android toolchain file within NDK detected: /home/jannejuntunen/Android/Sdk/ndk/27.2.12479018/build/cmake/android.toolchain.cmake – Android build detected, checking configuration defaults... – Neither ANDROID_PLATFORM nor ANDROID_NATIVE_API_LEVEL were specified, using API level 28 as default
When I created an application in Qt Creator which required access to the API level 28 NDK, I got this error (see attached reproducer).
/home/jannejuntunen/temp/wrongSdkSelected/main.cpp:19:40: error: 'AMEDIAFORMAT_KEY_PRIORITY' is unavailable: introduced in Android 28 19 | AMediaFormat_setInt32(mediaFormat, AMEDIAFORMAT_KEY_PRIORITY, 0);
Problem: it seems that Qt Creator defaults to SDK 23 when building the application.
When I build the reproducer from the command line, I do not see this error.
Creator maybe fails to read the SDK version from the kit in here:
https://github.com/qt-creator/qt-creator/blob/0bd06dc46f0d0d9b518c97e00cbe666a86dab7ef/src/plugins/android/androidutils.cpp#L182
and then defaults to 23:
https://github.com/qt-creator/qt-creator/blob/0bd06dc46f0d0d9b518c97e00cbe666a86dab7ef/src/plugins/android/androidutils.cpp#L477
Attachments
Issue Links
- mentioned in
-
Page Loading...