Found the cause for the runtime issues with my app. Let's say it is not a good idea to apply the usual CLI argument parsing under Android :-) But the actual crash was caused by bundling the wrong C++ standard libraries.
So if anybody is interested, here's an adjusted version of this package and some further libraries (OpenSSL, Kirigami, libiconv) for Android: https://github.com/Martchus/PKGBUILDs
The following things already seem to work:
- Building APK's with qmake and CMake/ECM
- Deploying a qmake project using Qt Creator
- Using Qt Network, Qt Sensors, Qt Svg, Qt Quick, Qt Quick Controls 1, Qt Quick Controls 2
- Using OpenSSL directly, eg. to do some AES crypto
- Make an HTTPS request via QNetworkAccessManager and OpenSSL
- Using Kirigami
- Opening files via
std::fstream
.
Other things doesn't seem to be supported very well:
- Deploying a CMake project using Qt Creator
- I was hoping FileDialog would open Android's native file selection. However, it only shows some custom, horribly to use dialog.
- The issue mentioned in my previous comment.
- Not having to specify an insane number of CMake variables. Eg. I couldn't figure out why I had to set
Qt5Core_DIR
when using the ECM toolchain file.
(Note that I have actually only tested the arm64-v8a variant. But I don't think it makes a difference.)
So the next step is further testing with the other architectures. Providing some wrapper scripts similar to mingw-w64-cmake
would be nice, too.
If anybody wants binaries for arm64-v8a
: https://martchus.no-ip.biz/repo/arch/ownstuff/os/x86_64
Note that the repo misses some dependencies like the SDK/NDK. That's due to license issues (at least I'm not 100 % sure whether I'm allowed to redistribute).
Pinned Comments
hipersayan_x commented on 2021-07-07 15:06 (UTC) (edited on 2021-07-07 15:10 (UTC) by hipersayan_x)
I'll drop this package, I been thinking and there are a lot of strong reasons not to waste any time maintaining it.
KDE doesn't provide an easy way to download the entire Qt source code in a single package, like in the official Qt releases.
Also, KDE doesn't provides tagged versions, I've to keep tracking manually the latest commits, or converting it to a git package.
It will require to split this package into 47x4 packages, 47 Qt modules and 4 architectures to maintain, that's 188 packages to maintain, absurd!
Cloning a git repository is slower than just downloading a source package file, making the build even much slower and painful.
Is a lot of work for something that will be dead in 1 year or 2 at most.
Good luck to the one that will step up to take care of this monstrosity, to the rest of developers, don't be lazy and consider switching to Qt6.