Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Unable to select Android Build SDK in Qt 5.7 on windows-7
QtWS25 Last Chance

Unable to select Android Build SDK in Qt 5.7 on windows-7

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 5 Posters 3.9k Views
  • 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.
  • G Offline
    G Offline
    gunS
    wrote on last edited by
    #1

    I am using Qt Creator 4.1.0 on Windows 7
    I have a problem selecting the Android Build SDK in the project configuration. The menu doesn't show anything and it is disabled.

    0_1481702656327_upload-1eb7f44c-8357-4e81-89cc-a09826c6d6f4

    I have API levels 18 to 24 in my SDK and NDK Bundle, revision 13.1.3345770
    Java JDK 1.8.0_111
    apache-ant-1.9.7

    I configured all these paths in Qt.
    When I run Qt takes by default --android-platform android--1 and returns the following error:

    Error: Target id 'android--1' is not valid. Use 'android.bat list targets' to get the target ids.
    Generating Android Package
      Input file: C:/Qt/Examples/Qt-5.7/bluetooth/build-scanner-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-libqml_scanner.so-deployment-settings.json
      Output directory: C:/Qt/Examples/Qt-5.7/bluetooth/build-scanner-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/android-build/
      Application binary: C:/Qt/Examples/Qt-5.7/bluetooth/build-scanner-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_7_0-Debug/libqml_scanner.so
      Android build platform: android--1
      Install to device: No
    Buildfile: build.xml does not exist!
    Build failed
    Warning: Android platform 'android--1' does not exist in SDK.
    Building the android package failed!
      -- For more information, run this command with --verbose.
    

    When I skipped this step and tried to do the same as an User defined step, setting --android-platform android-24 everything worked pretty fine and I could run the App on my device.

    I tried reinstalling Qt but didn't work. The Android Build SDK menu doesn't show anything.
    Could anyone help me in this context?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Carmoneer
      wrote on last edited by
      #2

      Hello,

      Within Qt Creator

      • On the 'Mode Selector' pane select 'Projects'.
      • Under 'Build & Run', expand 'Build Android APK' by selecting details.

      Under 'Application', do you have an SDK selected in the combo box for 'Android Build SDK:'?

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gunS
        wrote on last edited by
        #3

        Hello,

        That exactly is my problem. The combo box is more or less disabled. I cannot even expand it to select a SDK.

        0_1481792800626_upload-7ceba52a-9ebe-4e64-b803-074cd51ff52f

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Slv007
          wrote on last edited by
          #4

          I have same issue with Qt 5.7 and latest Qt 5.8 on Windows 10

          I tried: delete and reinstall Qt, delete and reinstall Android SDK - nothing helps.

          From logs I see something like this:

          14:46:34: Starting: "C:\Qt\5.8\android_armv7\bin\androiddeployqt.exe" --input D:/BBSDK/workspace_qt/build-Tabletki-Android_for_armeabi_v7a_GCC_4_9_Qt_5_8_0-Debug/android-libTabletki.so-deployment-settings.json --output D:/BBSDK/workspace_qt/build-Tabletki-Android_for_armeabi_v7a_GCC_4_9_Qt_5_8_0-Debug/android-build --deployment bundled --android-platform android--1 --jdk "C:/Program Files/Java/jdk1.8.0_45" --gradle
          

          So as temporary solution I copied this string and pasted in windows command line and replaced manually "android--1" to "android-22"

          1 Reply Last reply
          0
          • P Offline
            P Offline
            Purid
            wrote on last edited by Purid
            #5

            Hi,

            I have exactly the same Problem.
            Well sort of. My error message is slightly different but I have the same problem with my combo box being empty.
            Win 7, qt 5.8

            Build failed
            Warning: Android platform 'android--1' does not exist in SDK.
            Building the android package failed!
              -- For more information, run this command with --verbose.
            14:55:39: The process "C:\Qt\5.8\android_armv7\bin\androiddeployqt.exe" exited with code 14.
            Error while building/deploying project TrainingApp (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0))
            When executing step "Build Android APK"
            

            Has someone found a proper solution yet?
            Would be super helpful thx

            1 Reply Last reply
            0
            • P Offline
              P Offline
              Purid
              wrote on last edited by
              #6

              Found a workaround

              set environment Variables:

              Set ANDROID_API_VERSION to android--22
              Set ANDROID_BUILD_TOOLS_REVISION to 25.0.2
              Set ANDROID_NDK_PLATFORM to android--22

              this worked for me

              1 Reply Last reply
              0
              • V Offline
                V Offline
                Virva_hl
                wrote on last edited by Virva_hl
                #7

                Hello, I have the same issue. After searching from internet, I found this:
                https://bugreports.qt.io/browse/QTBUG-59236

                So I use the NDK version 10 instead of the latest one. and then reconfigure Qt(5.6.2) NDK path.. and also downloaded SDK tools_r25.2.5-windows.

                then the Project-> Build and Run -> Build Android APK shows the SDK level I can select from....

                then the build works... (I really hate it when people moving things around without notify others...)

                But then MY APP crash.... with message unfortunately, XXX has stopped..... at the start up.... so I have to continue debugging..... :(

                Hope this helps others.

                1 Reply Last reply
                0

                • Login

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