Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android build SDK not defined. Check Android settings.
Forum Updated to NodeBB v4.3 + New Features

Android build SDK not defined. Check Android settings.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 7 Posters 6.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NikhilJ
    wrote on last edited by
    #1

    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.

    jsulmJ 1 Reply Last reply
    0
    • N NikhilJ

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NikhilJ
        wrote on last edited by NikhilJ
        #3

        @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.

        jsulmJ 1 Reply Last reply
        0
        • N NikhilJ

          @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.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • N Offline
            N Offline
            NikhilJ
            wrote on last edited by
            #5

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

            AnatolySA 1 Reply Last reply
            0
            • N NikhilJ

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

              AnatolySA Offline
              AnatolySA Offline
              AnatolyS
              wrote on last edited by AnatolyS
              #6

              @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.

              C 1 Reply Last reply
              1
              • M Offline
                M Offline
                mvuori
                wrote on last edited by
                #7

                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>

                1 Reply Last reply
                2
                • AnatolySA AnatolyS

                  @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.

                  C Offline
                  C Offline
                  clrvDev
                  wrote on last edited by
                  #8

                  @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.

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    busheido
                    wrote on last edited by
                    #9

                    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.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      seyed
                      wrote on last edited by
                      #10

                      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

                      1 Reply Last reply
                      1

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved