When building Qt for Android with qmake in Qt 5.15, we always default to using the minimum SDK version (if it exists), even if if a newer version exists on the system.
The code that does that is here https://github.com/qt/qtbase/blob/3010c387132a54f81147d5b2c17d96b27f49fe0f/mkspecs/features/android/sdk.prf
QTBUG-96979 was partially caused by this, because the min SDK version was not increased, but new code was added that used newer API from a newer SDK version.
If we always defaulted to the latest available SDK (while also doing the min version validation), it would have been less likely that the problem would be hit.
We should consider doing the same in CMake here:
|For Gerrit Dashboard: QTBUG-98870|
|386083,5||Use the highest-available android SDK version as the 'target' SDK||dev||qt/qtbase||Status: MERGED||+2||0|
|386361,2||Use the highest-available android SDK version as the 'target' SDK||6.2||qt/qtbase||Status: MERGED||+2||0|
|386362,2||Use the highest-available android SDK version as the 'target' SDK||6.3||qt/qtbase||Status: MERGED||+2||0|