The SDK directory '...' does not exist.
-
Qt 5.7 / Windows 10
Android SDK C:\Android\android-sdk-25.2.5
Android NDK C:\Android\android-ndk-r10eOnce 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.
--
-
@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? -
@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?@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.jpgand here is the build output..
https://i.postimg.cc/jSL2FSmK/qt5.jpg -
@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.jpgand here is the build output..
https://i.postimg.cc/jSL2FSmK/qt5.jpg -
@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\\..
@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? -
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.