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. The SDK directory '...' does not exist.
QtWS25 Last Chance

The SDK directory '...' does not exist.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 5 Posters 1.1k 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.
  • K Offline
    K Offline
    kevinc
    wrote on last edited by
    #1

    Qt 5.7 / Windows 10
    Android SDK C:\Android\android-sdk-25.2.5
    Android NDK C:\Android\android-ndk-r10e

    Once upon a time, I could build my code, and generate my APK.
    Then, I decided that there was some redundancy in the paths of my SDK and NDK. D'oh! I renamed these directories appropriately, and didn't think much more about it.

    Now, having rearranged mention of SDKs and NDKs in Qt Creator, including Kits, Compilers, Debuggers, etc., and Devices such that "Android settings are OK. (SDK Version: 25.2.5, NDK Version: 10.4.0)", the result is that my code still compiles, yay, but

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    A problem occurred configuring root project 'android-build'.
    > The SDK directory 'C:\project\build-project-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1_android_armv7-Debug\android-build\C:Androidandroid-sdk-25.2.5' does not exist.
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
    
    BUILD FAILED
    

    Seems like androiddeployqt.exe is generating a path by catenating the shadow build directory and the SDK path. Of course, the SDK is not there!

    Where do I search to fix this?

    Kevin.

    --

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RobHills
      wrote on last edited by RobHills
      #2

      Did you figure out this issue? I am having the exact same problem

      1 Reply Last reply
      0
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #3

        @kevinc said in The SDK directory '...' does not exist.:

        C:\project\build-project-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1_android_armv7-Debug\android-build\C:Androidandroid-sdk-25.2.5

        This path is not valid: the first part is project build dir and second part is the SDK path
        C:\project\build-project-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1_android_armv7-Debug\android-build\C:Androidandroid-sdk-25.2.5
        I believe The SDK directory should be \C:Androidandroid-sdk-25.2.5
        Can you please post your android tab pic?

        R 1 Reply Last reply
        0
        • JoeCFDJ JoeCFD

          @kevinc said in The SDK directory '...' does not exist.:

          C:\project\build-project-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1_android_armv7-Debug\android-build\C:Androidandroid-sdk-25.2.5

          This path is not valid: the first part is project build dir and second part is the SDK path
          C:\project\build-project-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1_android_armv7-Debug\android-build\C:Androidandroid-sdk-25.2.5
          I believe The SDK directory should be \C:Androidandroid-sdk-25.2.5
          Can you please post your android tab pic?

          R Offline
          R Offline
          RobHills
          wrote on last edited by RobHills
          #4

          @JoeCFD here is my setup (i posed details about it here: https://forum.qt.io/topic/136162/sdk-directory-does-not-exist-qt-5-9-9-arm7a)

          https://i.postimg.cc/prh8YdP0/qt1.jpg
          https://i.postimg.cc/yYRcDWQx/qt2.jpg
          https://i.postimg.cc/kG0Sjd47/qt3.jpg
          https://i.postimg.cc/59T898mD/qt4.jpg

          and here is the build output..
          https://i.postimg.cc/jSL2FSmK/qt5.jpg

          R 1 Reply Last reply
          0
          • R RobHills

            @JoeCFD here is my setup (i posed details about it here: https://forum.qt.io/topic/136162/sdk-directory-does-not-exist-qt-5-9-9-arm7a)

            https://i.postimg.cc/prh8YdP0/qt1.jpg
            https://i.postimg.cc/yYRcDWQx/qt2.jpg
            https://i.postimg.cc/kG0Sjd47/qt3.jpg
            https://i.postimg.cc/59T898mD/qt4.jpg

            and here is the build output..
            https://i.postimg.cc/jSL2FSmK/qt5.jpg

            R Offline
            R Offline
            RobHills
            wrote on last edited by RobHills
            #5

            @RobHills I got past this issue. I changed the ANDROID_HOME and ANDROID_SDK_ROOT paths from single \ to double \ e.g. c:\Users\Rob.... to c:\\Users\\Rob\\..

            G 1 Reply Last reply
            0
            • R RobHills

              @RobHills I got past this issue. I changed the ANDROID_HOME and ANDROID_SDK_ROOT paths from single \ to double \ e.g. c:\Users\Rob.... to c:\\Users\\Rob\\..

              G Offline
              G Offline
              geraldhoxha
              wrote on last edited by
              #6

              @RobHills Hello Rob,
              I'm having the same issue.

              Where did you change the ANDROID_HOME and ANDROID_SDK_ROOT?
              Did it solve the issue?

              1 Reply Last reply
              0
              • F Offline
                F Offline
                fredmaria
                wrote on last edited by
                #7

                Hello, thanks to your input I was able to correct my issue, but with some difference from your solution.

                My environment : Windows 10, QtCreator 8.0.2, Qt 5.11.3, Android SDK Version: 8.0, NDK Version: 15.2.4203891.

                I only overrided the ANDROID_SDK_ROOT variable value replacing any \ by / characters. This has to be done from QtCreator > Projects > Build Settings > Build environment for each build configuration you need.

                Notes :

                • I tried to change the same windows system environment variable but without success (QtCreator seems to replace / by \ unfortunately when reading the environment). Finally, I ended up to remove the ANDROID_SDK_ROOT from the windows system environment variables.
                • The ANDROID_SDK_ROOT variable is used when qmake is run. This generates the android-lib...so-deployment-settings.json file in the build directory. This json file is used by androiddeployqt.exe.
                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