Saturday, April 4, 2020

Qt Creator: Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable

I've just installed Qt 5.12.7 with offline installer, and having previously setup the Android SDK and NDK, along with Java 8, when starting Qt Creator for the first time the following messages appeared under tab "6 General Messages":


Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
Could not read qmake configuration file /opt/Qt5.12.7/5.12.7/android_armv7/mkspecs/android-clang/qmake.conf.



In addition, the auto-detected Android kits were showing the red icon as "no compiler was found..." condition was showing.

The thing is, in spite for the ANDROID_NDK_ROOT environment variable to be properly set, somehow Qt Creator failed to recognize and use it. The solution, however, turned out to be simple: under Tools / Options / Devices / Android providing the proper path for the Android SDK and NDK did the trick. All error conditions dissapeared!

Happy coding!

No comments:

Post a Comment