Android Build Setup for KStars
madhavgrimm at gmail.com
Sat Mar 25 16:36:51 GMT 2023
If anyone is willing to fix the kstars_lite build for android and is stuck
with setting android sdk/ndk and qt for android, this guide should help you
get started quickly.
*1. Qt Creator*
Qt Creator must be installed via the Qt Online Installer (gui) and not the
system package manager (uninstall that first).
In that installer, Select the right Qt5 version according to kstars min
version. Under the same select Desktop and Android. This will correctly
setup qt creator and set the paths for Qt5 Android and Desktop
*2. Android SDK and Android NDK*
There is no need to install via sdkmanager or your system package manager.
Qt Creator comes with a tool (which inherently uses sdkmanager) to
automatically install it.
Edit > Preferences > Devices > Android, select a folder, click on set up
This will set up the Android SDK and NDK, with green ticks following in
that dialog box. Optionally select the OpenSSL also.
To install android system images for debugging, select SDK Manager again
*3. CMake Config*
Tick BUILD_KSTARS_LITE in Qt Creator Cmake Config. In the CMakeLists.txt
file, add the following
at around line 95, where find_package(qt5 is called)
find_package(Qt5DBus REQUIRED) must also be added.
Now on building (for desktop) , there will be a bunch of errors, fixing
these errors and proceeding to android build would be the right way.
I was mostly stuck getting the build environment right. Also, From android
API 27 (Oreo), we can't have AVDs and I'm not sure how to debug correctly
with newer Android versions.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kde-devel