Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android app crashes when I add an AndroidManifest.xml
QtWS25 Last Chance

Android app crashes when I add an AndroidManifest.xml

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 859 Views
  • 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 Offline
    S Offline
    SHamilton
    wrote on last edited by SHamilton
    #1

    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-worxR 1 Reply Last reply
    0
    • S 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-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @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
      2
      • S Offline
        S Offline
        SHamilton
        wrote on last edited by
        #3

        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-worxR 1 Reply Last reply
        0
        • S SHamilton

          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-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @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
          0
          • S Offline
            S Offline
            SHamilton
            wrote on last edited by
            #5

            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
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved