Unable to compile QGC for Android

Hello, I’m trying to run the QGC build for Android on QT. The Desktop build works just fine with MSCV 2019. When I try to compile the android build, i get the following error:

/usr/bin/sh: C:UsersaryanAppDataLocalAndroidSdkndk21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++: No such file or directory
/usr/bin/sh: C:UsersaryanAppDataLocalAndroidSdkndk21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++: No such file or directory
make[1]: *** [Makefile.Arm64-v8a:2411: arm64-v8a/qrc_qgroundcontrol.obj] Error 127
make[1]: *** [Makefile.Armeabi-v7a:2411: armeabi-v7a/qrc_qgroundcontrol.obj] Error 127

I cant’t solve this error. The android SDK’s are installed correctly and the compiler paths are also correct. In fact even other QT examples build fine for android, its just QGC which gives an error… I cant understand why it is utilizing that invalid path without any slashes in it. Any help would be appreciated, thank you.

Looks like something is going wrong with the windows paths. There should be / or \ between the directories there.

Hey, I’ve had the same problem while building QGC on Windows 10, did you have solved it?

Hi @Aryan_Ghadge1, I am also facing the same issue. I am using the following dependencies:

  • SDK: 12.0
  • NDK: 23.1.7779620 (r23b)
  • JDK: 21
  • QGCS: 4.2.6 / 4.2.8
  • Qt: 5.15.2
  • Configuration: Android Multi ABI
  • Compilers: Android Clang (C, arm, NDK 23.1.7779620) and Android Clang (C++, arm, NDK 23.1.7779620)
  • Platform Linker Flag: -target arm-linux-androideabi
  • Build Device: Desktop
  • ABIs: armeabi-v7a

08:18:51: Starting: “C:\Users\Chris.L\AppData\Local\Android\Sdk\ndk\23.1.7779620\prebuilt\windows-x86_64\bin\make.exe” -j4
rcc D:/Projects/AewaGCS4.2.8/qgroundcontrol/qgroundcontrol.qrc
/usr/bin/sh: line 1: C:UsersChris.LAppDataLocalAndroidSdkndk23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++: No such file or directory
rcc D:/Projects/AewaGCS4.2.8/qgroundcontrol/qgcresources.qrc
make: *** [Makefile:2413: armeabi-v7a/qrc_qgroundcontrol.obj] Error 127
make: *** Waiting for unfinished jobs…
/usr/bin/sh: line 1: C:UsersChris.LAppDataLocalAndroidSdkndk23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++: No such file or directory
make: *** [Makefile:2504: armeabi-v7a/qrc_qgcresources.obj] Error 127
08:18:52: The process “C:\Users\Chris.L\AppData\Local\Android\Sdk\ndk\23.1.7779620\prebuilt\windows-x86_64\bin\make.exe” exited with code 2.
Error while building/deploying project qgroundcontrol (kit: Android Qt 5.15.2 Clang Multi-Abi)
When executing step “Make”
08:18:52: Elapsed time: 00:13.