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

Android build SDK not defined. Check Android settings.



  • Error message : Android build SDK not defined. Check Android settings.
    Error while building/deploying project mapAndlocation (kit: Android for x86 (GCC 4.9, Qt 5.9.1 for Android x86))
    When executing step "Build Android APK"

    0_1507280323348_qr.JPG 1_1507280393017_options.JPG 0_1507280393017_android settings.JPG

    Please have a look my QT creator settings and please let me know whats the issues i am unable to run apps on emulator or android device.

    Thanks in advance.


  • Qt Champions 2019

    @NikhilJ In the middle of the first screenshot you can see a combo box "Android build SDK" - there is nothing selected.



  • @jsulm yes that's the reason. I don't know why platforms are not showing there. I have already give complete SDK path in screen shot 3. And SDK path in environment variable as well. can u please help me to know the reason.
    I am using 64 bit windows 10. with latest android SDK & QT version.


  • Qt Champions 2019

    @NikhilJ Is there nothing in "Android build SDK"?



  • @jsulm Yes i am unable to select platform in this drop down.(Empty).



  • @NikhilJ I had the same problem, but I have installed the latest Qt 5.9.2, the latest JDK 1.8.0-151, the latest Android NDK (android-ndk-r15c), the latest Android SDK Tools (26.1.1), the latest Android SDK Platform-Tools (26.0.1), the latest Android SDK Build-Tools (26.0.2) and also I have installed all Android SDK for API Level from 16 to 26, and now I do not observe the problem.
    .

    Also check: can you invoke java -version from command line? What do you see? It must be JDK 8 or early.

    Qt Creator must be available to call sdkmanager, avdmanager and etc. To do it you have to set the JAVA_HOME environment variable to JDK 8 and put JAVA_HOME/bin into the PATH environment variable before calling Qt Creator.



  • If I remember correctly this problem may be due to a bug in QtCreator that puts empty BuildTargetSdk keys on the .pro.user file. Try editing that an add appropriate values for the key (at many locations), e.g.

    key="BuildTargetSdk">android-23</value>



  • @AnatolyS Hello, i had the same issue, but after removing a old jdk and reinstalling JDK version 8 update 151 everything works.
    I have not set the JAVA_HOME environnement variable.



  • I had the same problem while importing qt examples with QtCreator 4.7 (Qt5.11.1) on Mac. My solution was similar to @mvuori. Once I replaced empty BuildTargetSdk keys inside .pro.user with "android-26", the "Android build SDK" option has become selectable.



  • OK, after many hours try out I finally find out how you can fix it.

    • Download and use Android NDK r10e separately (not install it through SDK Manager)
    • Download and use Android SDK without Android Studio (download android tools from official site) Qt Preferences will installs all needed packages (build tools , platform tools, sdk tools, platform android-28)
    • Install and use Java JDK 8 (not newer)

    Please note that installing sdk packages through Android Studio will not be detectable by Qt


Log in to reply