Issue
I've been experiencing this issue for 2 months. Qt Creator indicates that ndk path and directory have issues though the messages are confusing.
This happens with every Android Kit.
In Qt Creator, looking at Options -> Devices -> Android, Android Settings display two error messages with red 'X' on the left side:
- "X Android NDK directory structure is correct."
- "X Android NDK installed into a path without spaces."
I don't have no idea what message 1 is trying to tell me, here is the structure of the directory:
.
├── build
├── meta
├── ndk-build
├── ndk-depends
├── ndk-gdb
├── ndk-which
├── NOTICE
├── NOTICE.toolchain
├── prebuilt
├── python-packages
├── README.md
├── shader-tools
├── simpleperf
├── sysroot
├── toolchains
└── wrap.sh
Regarding the second error message this is the path:
/home/user/Android/android-ndk-r18b
I can't see how could be a space in the above path.
When I try to build any Project with Android Kit, I receive the following error at the output:
opt/Qt/5.12.0/android_armv7/include/QtCore/qglobal.h:45:12: fatal error: 'type_traits' file not found
Info:
- Ubuntu 18.04;
- Qt 5.12.0;
- Qt Creator 4.8;
Solution
The root of all this trouble were two silly mistakes when unzipping the downloaded ndk.
- The first error is the one that motivated me to post this question and is related with my low end computer and my Ubuntu 18.04. When unzipping files, the OS doesn't provides any message warning me that the process has finished. My computer takes ~2 min to complete the extraction, so my guess is that I did a copy and paste of the folder before all the files were extracted.
After taking notice from this fact and downloaded again the ndk, but I was getting the same errors, although I was sure the extraction was successful. And here is the another silly mistake:
When unzipping the ndk, a folder is created, which contains another folder with nearly identical name, here's the structure:
...android-ndk-r19c-linux-x86_64/android-ndk-r19c/
In the Qt Creator I was providing the path to
...android-ndk-r19c-linux-x86_64/and not to...android-ndk-r19c-linux-x86_64/android-ndk-r19c/, after altering to the correct path everything worked fine.
Important Note: From Qt5.12 forward, is recommended to use the latest ndk version.
Answered By - Oshio
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.