Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.1
-
None
-
-
6036b9c706faf3f94715566e8b3b97c65271bc16 (qt/qtbase/6.2) 95ccdfa432 (qt/tqtc-qtbase/6.3)
Description
When compiling jars for Android platform, Qt uses hardcoded platform version when locating android.jar. If hardcoded platform version is not found, it tries to find the latest version available: https://github.com/qt/qtbase/blob/v6.2.1/cmake/QtPlatformAndroid.cmake#L36.
There is a problem with this code, though - it uses lexicographic comparison for version numbers, which means if, for example, hardcoded version is "android-30" and "sdk/platforms" directory contains "android-9" and "android-31" then Qt will use "android-9" platform for jars compilation and build will fail.
AFAIK "COMPARE NATURAL" option that was added to "list(SORT)" in CMake 3.18 should fix this but IIRC minimal version for Qt build is lower.