configuring Qt to create android apps
-
Hello!
I am trying to configure the qt build to create android applications according to this instruction:
https://doc.qt.io/qt-6/android-building.html .
I downloaded android sdk and android ndk and placed them as indicated here:
https://doc.qt.io/qt-6/android-getting-started.html .
I have Linux, so in ~/Android/Sdk/.
Also, I executed the commands:
sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0" and
sdkmanager "ndk;26.1.10909125" .
I run:
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/configure -prefix my_installation_path -qt-host-path path_of_installed_qt6.8
-android-abis x86_64 -android-sdk ~/Android/Sdk -android-ndk ~/Android/Sdk/ndk/26.1.10909125and I get the error:
-- Configuring incomplete, errors occurred!
See also "/home/.../qt-build-android/CMakeFiles/CMakeOutput.log".
See also "/home/.../qt-build-android/CMakeFiles/CMakeError.log".
CMake Error at /home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/qtbase/cmake/QtProcessConfigureArgs.cmake:1139 (message):
CMake exited with code 1.CMake Error at /home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/cmake/QtIRProcessHelpers.cmake:173 (message):
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/qtbase/configure
-top-level -prefix /home/.../qt6-android -qt-host-path /home/.../qt6
-android-abis x86_64 -android-sdk /home/.../Android/Sdk-android-ndk
/home/.../Android/Sdk/ndk/26.1.10909125 exited with status: 1Call Stack (most recent call first):
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/cmake/QtTopLevelHelpers.cmake:35 (qt_ir_execute_process_and_log_and_handle_error)
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/cmake/QtTopLevelHelpers.cmake:57 (qt_tl_run_toplevel_configure)
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/cmake/QtTopLevelConfigureScript.cmake:17 (qt_tl_run_main_script) .CMakeError.log says:
Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
Android (10552028, +pgo, +bolt, +lto, -mlgo, based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/.../Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin .What did I do wrong?
Thanks in advance! -
Hello!
I am trying to configure the qt build to create android applications according to this instruction:
https://doc.qt.io/qt-6/android-building.html .
I downloaded android sdk and android ndk and placed them as indicated here:
https://doc.qt.io/qt-6/android-getting-started.html .
I have Linux, so in ~/Android/Sdk/.
Also, I executed the commands:
sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0" and
sdkmanager "ndk;26.1.10909125" .
I run:
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/configure -prefix my_installation_path -qt-host-path path_of_installed_qt6.8
-android-abis x86_64 -android-sdk ~/Android/Sdk -android-ndk ~/Android/Sdk/ndk/26.1.10909125and I get the error:
-- Configuring incomplete, errors occurred!
See also "/home/.../qt-build-android/CMakeFiles/CMakeOutput.log".
See also "/home/.../qt-build-android/CMakeFiles/CMakeError.log".
CMake Error at /home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/qtbase/cmake/QtProcessConfigureArgs.cmake:1139 (message):
CMake exited with code 1.CMake Error at /home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/cmake/QtIRProcessHelpers.cmake:173 (message):
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/qtbase/configure
-top-level -prefix /home/.../qt6-android -qt-host-path /home/.../qt6
-android-abis x86_64 -android-sdk /home/.../Android/Sdk-android-ndk
/home/.../Android/Sdk/ndk/26.1.10909125 exited with status: 1Call Stack (most recent call first):
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/cmake/QtTopLevelHelpers.cmake:35 (qt_ir_execute_process_and_log_and_handle_error)
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/cmake/QtTopLevelHelpers.cmake:57 (qt_tl_run_toplevel_configure)
/home/.../Projects/cpp/qt/qt-everywhere-src-6.8.2/cmake/QtTopLevelConfigureScript.cmake:17 (qt_tl_run_main_script) .CMakeError.log says:
Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
Android (10552028, +pgo, +bolt, +lto, -mlgo, based on r487747d) clang version 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d16663d5012e5c09495f3b30ece3d2362)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/.../Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin .What did I do wrong?
Thanks in advance!@woodpecker Why are you trying to build Qt by yourself? You can simply install Qt for Android using Qt Online Installer.
-
I would like to have all Qt libraries in one place, and not scattered across system folders.
-
I would like to have all Qt libraries in one place, and not scattered across system folders.
@woodpecker I don't get it: if you install Qt using the online installer then it will be installed in a folder in your user home folder (/home/USER_NAME/Qt by default).
-
So, to remove Qt you just need to delete the home/USER_NAME/Qt folder along with its contents?
-
So, to remove Qt you just need to delete the home/USER_NAME/Qt folder along with its contents?
@woodpecker yes
-
OK, I'll try now.
Thanks.