Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Android app crashes when I add an AndroidManifest.xml

    Mobile and Embedded
    2
    5
    448
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      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_libs to 1 and bundle_local_qt_libs to 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.

      raven-worx 1 Reply Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators @SHamilton last edited by

        @SHamilton
        https://bugreports.qt.io/browse/QTBUG-71590

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply Reply Quote 2
        • S
          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...

          raven-worx 1 Reply Last reply Reply Quote 0
          • raven-worx
            raven-worx Moderators @SHamilton last edited by

            @SHamilton
            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.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply Reply Quote 0
            • S
              SHamilton last edited by

              I set the Android Build SDK to android-28 and ran into the same issue. The test device is currently running Android 11, would that have any effect? My manifest currently looks like this in the editor:
              A picture of the Android manifest editor image url)

              1 Reply Last reply Reply Quote 0
              • First post
                Last post