Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
-
Hello! I am trying to install the
mqtt
module to android_armv7. To do this, I create a folder named build and run this:~/Qt/5.12.4/android_armv7/bin/qmake qmake -r ..
. Unfortunately I recieve this error:Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK. Could not read qmake configuration file /home/stefan/Qt/5.12.4/android_armv7/mkspecs/android-clang/qmake.conf. Error processing project file: ../qtmqtt.pro
I have tried going to tools->External->Configure->Environment->External Tools->Update Translations and wrote:
ANDROID_NDK_ROOT=/home/stefan/Downloads/android-ndk-r19c/android-ndk-r19c
PATH=
in the Environment Change section. It didn't work. A strange thing (for me) is that I can deploy an application (without mqtt) on android_armv7. I am using Linux. What should I do now? -
Hi,
It looks like you are trying to do that in a terminal and modify settings in an application. What exactly are you doing ?
Since you have it working in Qt Creator as it seems, just define these environment variable for the terminal you want to build qtmqtt in.
-
If you want to install
mqtt
module, you have to install it inside lib of android, and they will make for all architecture.
You can refer this link to install it.
https://forum.qt.io/topic/107020/how-to-use-mqtt-client-class-in-qml/9 -
Hi,
It looks like you are trying to do that in a terminal and modify settings in an application. What exactly are you doing ?
Since you have it working in Qt Creator as it seems, just define these environment variable for the terminal you want to build qtmqtt in.
@SGaist said in Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.:
Hi,
It looks like you are trying to do that in a terminal and modify settings in an application. What exactly are you doing ?
Since you have it working in Qt Creator as it seems, just define these environment variable for the terminal you want to build qtmqtt in.
Hi and thank you for the reply. It works in the Qt Creator, but only for gcc_64. How should I define the environment variables?
-
@SGaist said in Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.:
Hi,
It looks like you are trying to do that in a terminal and modify settings in an application. What exactly are you doing ?
Since you have it working in Qt Creator as it seems, just define these environment variable for the terminal you want to build qtmqtt in.
Hi and thank you for the reply. It works in the Qt Creator, but only for gcc_64. How should I define the environment variables?
@20Stefan05 said in Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.:
How should I define the environment variables?
In the same way they are set in Build Environment in QtCreator: "Projects/Build & Run/Build/Build Environment".
-
@20Stefan05 said in Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.:
How should I define the environment variables?
In the same way they are set in Build Environment in QtCreator: "Projects/Build & Run/Build/Build Environment".
@jsulm Thank you! But the ANDROID_NDK_ROOT variable points my Android NDK.
-
In your terminal ?
-
@SGaist
Here. -
Well... that's Qt Creator. You have to set them in the terminal you are using to build the module.
-
Well... that's Qt Creator. You have to set them in the terminal you are using to build the module.
@SGaist But I don't know how to do it. Could you help me?
-
@SGaist But I don't know how to do it. Could you help me?
@20Stefan05
Hi
https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-environment-variables-in-linux/so try
export ANDROID_NDK_ROOT=/home/stefan/Downloads/android-ndk-r19c/android-ndk-r19c
in the terminal -
@20Stefan05
Hi
https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-environment-variables-in-linux/so try
export ANDROID_NDK_ROOT=/home/stefan/Downloads/android-ndk-r19c/android-ndk-r19c
in the terminal@mrjj Thank you!
-
Does Qt 5.15.0 works with ndk side-by-side? I have ndk version 21.2.6472646 installed via Android Studio. Qt Creator keeps wanting me to install 21.2.63xxxxx version.
Where can I find which Qt version requires which NDK version?
-
Does Qt 5.15.0 works with ndk side-by-side? I have ndk version 21.2.6472646 installed via Android Studio. Qt Creator keeps wanting me to install 21.2.63xxxxx version.
Where can I find which Qt version requires which NDK version?
Hi
Here
https://doc.qt.io/qt-5/android-getting-started.htmlQt 5.14.0 or later, Qt 5.13.2 or later, and Qt 5.12.6 or later NDK r20b or r21 android-clang Note: Qt 5.14.0 and 5.14.1 with NDK r21 have a bug fixed at QTBUG-81461. Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1 NDK r19c android-clang Qt 5.11 and below NDK r10e GCC toolchain
-
Hi
Here
https://doc.qt.io/qt-5/android-getting-started.htmlQt 5.14.0 or later, Qt 5.13.2 or later, and Qt 5.12.6 or later NDK r20b or r21 android-clang Note: Qt 5.14.0 and 5.14.1 with NDK r21 have a bug fixed at QTBUG-81461. Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1 NDK r19c android-clang Qt 5.11 and below NDK r10e GCC toolchain
@mrjj said in Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.:
Hi
Here
https://doc.qt.io/qt-5/android-getting-started.htmlQt 5.14.0 or later, Qt 5.13.2 or later, and Qt 5.12.6 or later NDK r20b or r21 android-clang Note: Qt 5.14.0 and 5.14.1 with NDK r21 have a bug fixed at QTBUG-81461. Qt 5.12.0 to 5.12.5 and Qt 5.13.0 to 5.13.1 NDK r19c android-clang Qt 5.11 and below NDK r10e GCC toolchain
There is no version
r21
. There's a version21c
which seems to have issue with Qt 5.15.0https://developer.android.com/ndk/downloads/revision_history
-
This is a bit problematic. There is no mention of
r21
on NDK Revision History or NDK Downloads or Unsupported NDK Downloads. Qt should try to support the latest NDK which would ber21d
. -
This is a bit problematic. There is no mention of
r21
on NDK Revision History or NDK Downloads or Unsupported NDK Downloads. Qt should try to support the latest NDK which would ber21d
.@Sudhir-Khanger
Hi
but dont r21d works ? -
@Sudhir-Khanger
Hi
but dont r21d works ?@mrjj said in Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.:
@Sudhir-Khanger
Hi
but dont r21d works ?I have my setup working with an older version of NDK which probably corresponds to
r21
. It didn't work for me with newer version of NDK. -
@mrjj said in Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.:
@Sudhir-Khanger
Hi
but dont r21d works ?I have my setup working with an older version of NDK which probably corresponds to
r21
. It didn't work for me with newer version of NDK.@Sudhir-Khanger
Hi
This is with Qt5.15.0. correct ? -
@Sudhir-Khanger
Hi
This is with Qt5.15.0. correct ?@mrjj said in Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.:
@Sudhir-Khanger
Hi
This is with Qt5.15.0. correct ?Yes, the latest version of NDK doesn't work with the latest stable version of Qt.