I have been in the process of cloning QGC and getting it set up for development, but have run into an issue with configuring an Android build (I found your email at the top of one of the source files). In order to configure the SDK and NDK I downloaded both and pointed to them inside of Tools > Options inside of QT creator. After clicking OK, when I go back into Tools > Options the SDK’s path is still there, but the path to the NDK disappears. Along with this, inside of Projects > Android > Build > Build Android APK > Android build SDK there are no SDK’s present in the dropdown. Any ideas as to what could be the problem? I can provide screenshots / more info if needed.
Setting up an android build is a royal PITA. Always takes me forever to get it works. I’ve never seen the problem you are seeing. These sorts of things don’t have anything to with QGC necessarilyu. They are just generic Qt android setup. Make sure to work through the Qt android setup docs.
So it turns out that it was occurring because I wasn’t pointing it at the correct SDK. I have fixed that, and it is now able to see the SDK and NDK, but when I attempt to build, I get an error saying “The installed SDK tools version (2.0) does not include Gradle scripts. The minimum Qt version required for Gradle build to work is 5.9.0/5.6.3” even though I am on a later QT version (I think 5.12, but I can’t check right now because it appears that the authentication server for QT is down, which is preventing me from using the maintenance tool…)
Did you carefully follow the the steps from the Qt documentation?
I just went through the steps setting it up on Ubuntu and was able to build successfully. Here’s my installed packages list for reference
jake@jake:~/Android/Sdk/tools/bin$ ./sdkmanager --list
Installed packages:=====================] 100% Computing updates...
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;29.0.2 | 29.0.2 | Android SDK Build-Tools 29.0.2 | build-tools/29.0.2/
build-tools;30.0.0 | 30.0.0 | Android SDK Build-Tools 30 | build-tools/30.0.0/
emulator | 30.0.12 | Android Emulator | emulator/
ndk-bundle | 21.3.6528147 | NDK | ndk-bundle/
ndk;19.2.5345600 | 19.2.5345600 | NDK (Side by side) 19.2.5345600 | ndk/19.2.5345600/
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/
platform-tools | 30.0.2 | Android SDK Platform-Tools | platform-tools/
platforms;android-29 | 4 | Android SDK Platform 29 | platforms/android-29/
platforms;android-30 | 1 | Android SDK Platform 30 | platforms/android-30/
I am on Windows, not Ubuntu. I looked over the steps one more time and it looks like I have done everything right. I also tried changing the QT version for the android kit from QT 5.12.6 MSVC 2017 64bit to QT 5.12.6 for Android ARM64-v8a, which gives me an error that states “Unsupported Windows toolchain, only Visual Studio 2017 64 bit is supported”.
If you are getting this error “Unsupported Windows toolchain, only Visual Studio 2017 64 bit is supported” then you are trying to build a Windows version of QGC not an android version of QGC. That said I’m not sure I’ve ever heard of anyone getting android to build on windows. In general windows is the largest PITA to get anything to work. Linux and/or OSX seem to work fine and aren’t crazy hard to get android builds set up on them.