Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Android Target SDK version being reduced



  • I am trying to build an apk that targets version 29 of the Android SDK, however when I compile it seems that the Target SDK version is reduced.

    I get this log message at the end of my compile output before the tasks:

    Android build platform: android-29
    Install to device: No

    Configure project :
    WARNING: minSdkVersion (29) is greater than targetSdkVersion (28) for variant "debug". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.
    WARNING: minSdkVersion (29) is greater than targetSdkVersion (28) for variant "release". Please change the values such that minSdkVersion is less than or equal to targetSdkVersion.

    However I am targeting android 29 in the manifest and in the "Build Android APK" build step, is there something I am missing here?

    Screen Shot 2020-10-27 at 9.29.45 AM.png

    Screen Shot 2020-10-27 at 9.28.53 AM.png



  • This is on Qt 14.2 with ndk 21 and MacOS Mojave 10.14.4,

    if I run "grep SdkVersion" on the output apk I get:
    A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1d
    A: android:compileSdkVersionCodename(0x01010573)="10" (Raw: "10")
    A: android:minSdkVersion(0x0101020c)=(type 0x10)0x15
    A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1c

    So the compile sdk version is correct and the min version (currently at 21) but the target version is lower than what I am specifying in the manifest.

    I've tried updating to qt 15.1 but the app crashes every time I click on anything. Is there something I am missing here?



  • I could be wrong but this sounds like there's just a "Run qmake" missing.



  • Im getting the same issue on 15.2 and 14.2 on both Mojave and Big Sur. The only way I can build for the latest platform is with qt 11.3 With NDK r10e but with any other combination it always targets API 28 instead of 29.



  • @ConnorLee I have the same issue with my installation. I did not notice the problem earlier, but then I updated Android SDK to the latest version and after that I can't deploy my app any more to any device. QtCreator says "Android settings are OK. (SDK Version: 3.0, NDK Version: 21.3.6528147)"
    From the AnroidManifest.xml I can't set minimum nor target SDK.

    6a3da6f9-7915-4a82-9881-a804ce932585-kuva.png


Log in to reply