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. Application not working in release mode on Android
Forum Updated to NodeBB v4.3 + New Features

Application not working in release mode on Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 3 Posters 1.9k 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.
  • D Offline
    D Offline
    daljit97
    wrote on last edited by daljit97
    #1

    So I am experiencing a strange problem, my app (for Android) works fine if I build the application in Debug mode, however when I run the app on the device in release it doesn't work, more specifically the app runs (the UI written in QML works fine), but network requests (done using QNetworkAccessManager) don't work. Also in Release mode, in the "Application Output" tab there is no output and no qDebug() event is shown.
    EDIT: I have just checked and noticed that qDebug events (or anything else) are not shown in the Application Output even if I run the application in debug mode, however everything else works fine in debug mode (network requests are completed).

    EDIT2: below is my configuration

    0_1537103266439_Screenshot_20180916_140630.png

    M 1 Reply Last reply
    0
    • D daljit97

      So I am experiencing a strange problem, my app (for Android) works fine if I build the application in Debug mode, however when I run the app on the device in release it doesn't work, more specifically the app runs (the UI written in QML works fine), but network requests (done using QNetworkAccessManager) don't work. Also in Release mode, in the "Application Output" tab there is no output and no qDebug() event is shown.
      EDIT: I have just checked and noticed that qDebug events (or anything else) are not shown in the Application Output even if I run the application in debug mode, however everything else works fine in debug mode (network requests are completed).

      EDIT2: below is my configuration

      0_1537103266439_Screenshot_20180916_140630.png

      M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      First thing to check is that you are using a late & most bug-free Qt version. And with Android, the second thing check is the version of NDK.
      Related: When writing about problems, you should always tell the versions of everything - Qt, Android SDK & NDK, version of Android OS...
      Without knowing the baseline - and first making sure it is correct - it makes no sense to try to figure out the possible problems and solutions.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        daljit97
        wrote on last edited by
        #3

        @mvuori yes you're right, I should have mentioned. The Qt version I am using is 5.11.0, NDK 10.4.0 (revision 10e), SDK Version: 26.1.1 and I am testing on Android 8.0 Oreo.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          daljit97
          wrote on last edited by
          #4

          So I have investigated the issue a bit further. First I decided to completely remove and do a full reinstall of Qt on my system. Then I tried to run the application on an x86 emulator (one from the provided in Android Studio) and I have noticed that the application works fine there and the log messages are displayed correctly. So then I connected my phone, and tried to run ./adb logcat to see if any log messages were displayed after launching the application from Qt Creator on the device and unfortunately no messages are displayed. I am a bit lost on what to do next.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            daljit97
            wrote on last edited by
            #5

            I have a got a new update on this issue, which I still can't solve. What I discovered is that this is somehow related to the device I am using. Indeed, I tried to run the application on Windows and saw the same issue. Then I tried to plug in a different Android device (Sony) and magically all the log messages were there. So I thought there was some problem with my device (LG G6 with Android 8.0) and I performed a hard reset on it (erasing all data and settings), but the issue still persists and log messages are not showing at all. Can anyone help me with this? I was able to see the log messages up until 2 weeks ago on the same device and now I suddenly can't.

            aha_1980A 1 Reply Last reply
            0
            • D daljit97

              I have a got a new update on this issue, which I still can't solve. What I discovered is that this is somehow related to the device I am using. Indeed, I tried to run the application on Windows and saw the same issue. Then I tried to plug in a different Android device (Sony) and magically all the log messages were there. So I thought there was some problem with my device (LG G6 with Android 8.0) and I performed a hard reset on it (erasing all data and settings), but the issue still persists and log messages are not showing at all. Can anyone help me with this? I was able to see the log messages up until 2 weeks ago on the same device and now I suddenly can't.

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by aha_1980
              #6

              Hi @daljit97,

              if you create bugreports, please provide a link also here: QTCREATORBUG-21163. That way, others can follow the discussion later.

              Thanks!

              Regarding you problem:

              I was able to see the log messages up until 2 weeks ago on the same device and now I suddenly can't.

              Have you changed anything on your computer? Updated Qt, Qt Creator or Android NDK or SDK?

              Qt has to stay free or it will die.

              1 Reply Last reply
              1
              • D Offline
                D Offline
                daljit97
                wrote on last edited by
                #7

                Thanks for the tip, I will keep that in mind.

                @aha_1980 said in Application not working in release mode on Android:

                Have you changed anything on your computer? Updated Qt, Qt Creator or Android NDK or SDK?

                Well, yes I have reinstalled Qt on my Linux machine and installed Android Studio (for SDK and NDK). However, as I mentioned in the bug report I have tried to run the application from a fresh install of Qt on Windows and experienced the same issue.

                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