Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Android app crashes when I add an AndroidManifest.xml
SHamilton last edited by SHamilton
I've been banging my head against a wall for a few weeks trying to figure out what is going on. I've reinstalled Qt Creator multiple times, installed several different Android SDK packages, directly modified the manifest, but no dice. Every time I attempt to add an AndroidManifest to my app, the app never gets past boot, it just instantly crashes with the simple message "Your application encountered a fatal error and cannot continue", and once you tap OK, it quits. I've looked all over Google and I seem to be the only one with this mysterious issue. If I delete the folder containing all the templates generated, which includes the manifest, everything is fine, and the app functions as expected.
After connecting a debugger and looking at the errors its throwing, it almost looks to me as if none of the Qt libraries get bundled with the Apk. I built the app as debug and got this error. When I built the app as release, I got the same crash behavior, but a different error message.
I wondered if my version of Qt was just broken, but updating and reinstalling did nothing. I wondered if it was something wrong with my app itself, so I opened the Qt Quick Swipe project template and tried deploying that with the same behavior. I wondered if qmake simply wasn't setting something in the manifest, so I set
use_local_qt_libsto 1 and
bundle_local_qt_libsto 1, assuming it would bundle the libs into tho Apk as this book states. Yet directly changing those did nothing.
What is happening? I've been trying this on a Surface Pro 5 and a Samsung Galaxy Note 20 Ultra. Also tried my laptop running Manjaro Linux, but that also had the same result, with the same exact errors.
SHamilton last edited by
Shoot, this bug is from two years ago and still open and being updated. Will I just have to wait for this bug to be fixed? Looking at the Android documentation looks like I have to request for a new public API... Seems out of my control, unless no one else has requested one, but seeing this is a two year old issue, I don't see why one wouldn't have already requested...
as a workaround you can target API level 28 as stated in the bug report.
This issue has to be fixed sooner or later, by reading the comments.