Troubleshooting Qt Gradle Plugin
Error:"'gradle' is not recognized..."
Fix: Add the location of the Gradle executable that is part of your desired Qt build installation into your system path environment variable
Linux & macOS
export PATH=$PATH:/home/<your-username>/<your-Qt-builds>/<your-Qt-kit>/src/3rdparty/gradle (Linux, macOS)
Windows
set PATH=%PATH%;C:\<your-username>\myQtBuilds\<your-Qt-kit>\src\3rdparty\gradle
Error: "No Qt for Android kit found".
Fix: qtPath = file('..../Qt') needs to have the Qt version as the path's target folder. For example:('..../Qt/6.8.0')
Error:"[home/../declarative/build/qt_generated/quick, aar] failed with exit code 1".
Fix: If you use qtKitDir
, change qtPath
to use an absolute path instead of the relative one.
Relative:
file('..../Qt/6.8.0')
Absolute:
file('/home/<username>/Qt/6.8.0')
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.