Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtCreator and qmake for Android - producing Makefiles that do not work on Windows



  • Hello. I am trying to build an application for Android using Qt Creator on Windows. This application depends on Qt 5.12, so I need to use that specific version. The build fails saying that "The syntax of the command is incorrect". It seems like qmake produces a Makefile with Linux-style paths, which doesn't play well with Windows.

    How can I fix this?

    See output below:

    15:51:30: Starting: "C:\Qt\5.12.9\android_x86\bin\qmake.exe" D:\git\qgroundcontrol\qgroundcontrol.pro -spec android-clang "CONFIG+=qtquickcompiler"
    15:51:47: Starting: "C:\Users\oyste\AppData\Local\Android\Sdk\ndk\21.1.6352462\prebuilt\windows-x86_64\bin\make.exe" -f D:/git/build-qgroundcontrol-Android_Qt_5_12_9_Clang_x86-Release/Makefile qmake_all
    15:51:47: Starting: "C:\Users\oyste\AppData\Local\Android\Sdk\ndk\21.1.6352462\prebuilt\windows-x86_64\bin\make.exe" -j12
    mkdir D:/git/build-qgroundcontrol-Android_Qt_5_12_9_Clang_x86-Release/ANDROID_PACKAGE_SOURCE_DIR && xcopy /s /q /y /i D:/git/qgroundcontrol/android/* D:/git/build-qgroundcontrol-Android_Qt_5_12_9_Clang_x86-Release/ANDROID_PACKAGE_SOURCE_DIR && xcopy /s /q /y /i D:/git/qgroundcontrol/custom/android/* D:/git/build-qgroundcontrol-Android_Qt_5_12_9_Clang_x86-Release/ANDROID_PACKAGE_SOURCE_DIR && C:\Qt\5.12.9\android_x86\bin\qmake.exe -install sed -i "s/package=\"org.mavlink.qgroundcontrol\"/package=\"org.custom.qgroundcontrol\"/" D:/git/build-qgroundcontrol-Android_Qt_5_12_9_Clang_x86-Release/ANDROID_PACKAGE_SOURCE_DIR/AndroidManifest.xml
    The syntax of the command is incorrect.
    

Log in to reply