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. Cannot debug apps
Forum Updated to NodeBB v4.3 + New Features

Cannot debug apps

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
12 Posts 6 Posters 2.8k Views 2 Watching
  • 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.
  • G Offline
    G Offline
    Gourmet
    wrote on 27 Nov 2018, 15:42 last edited by
    #1

    Year ago I was able debug my apps with prev QtCreator 4.0.3 on my Honor 6X with Android 6. Apps were build for API level 23. Now I try do same with QtCreator 4.6.2 on same 6X but with Android 7.1. App is build for API level 26. In Creator console I get message:

    Failed to get process path. Reason:command «/opt/android-sdk-linux/platform-tools/adb» ended with code 1.

    I found possible description - on some devices the command run-as is not supported. But I tried check this in console. I have got this:

    :/opt/android-sdk-linux/platform-tools$ ./adb shell
    HWBLN-H:/ $
    HWBLN-H:/ $ run-as com.myname.myapp pwd
    run-as: Package 'com.myname.myapp' is not debuggable
    1|HWBLN-H:/ $

    What??? Why my app is not debuggable? I have definitely build app with Debug turned on and with debug server added (option in Projects settings). What is wrong with this app? The run-as command works. But what should I do to allow debug my app?

    J 1 Reply Last reply 28 Nov 2018, 10:20
    0
    • M Offline
      M Offline
      mvuori
      wrote on 28 Nov 2018, 10:12 last edited by
      #2

      I have a Huawei (Android 8.0) that doesn't debug at 23, while my Sony (7.1) does. I would drop API level back to 23 to see if the problem is in the API level or whether the Huawei's new Android version has a problem.
      ...But I recall people using 26 having problems, so if you don't need to put the app in Google Play, leaving it in 23 for now might be a solution.
      (Also, I assume that your SDK and NDK are versions that people have positive experiences with.)

      G 1 Reply Last reply 28 Nov 2018, 10:17
      1
      • M mvuori
        28 Nov 2018, 10:12

        I have a Huawei (Android 8.0) that doesn't debug at 23, while my Sony (7.1) does. I would drop API level back to 23 to see if the problem is in the API level or whether the Huawei's new Android version has a problem.
        ...But I recall people using 26 having problems, so if you don't need to put the app in Google Play, leaving it in 23 for now might be a solution.
        (Also, I assume that your SDK and NDK are versions that people have positive experiences with.)

        G Offline
        G Offline
        Gourmet
        wrote on 28 Nov 2018, 10:17 last edited by
        #3

        @mvuori of course I debug app with API 26 to publish on GP. This is lowest API level allowed.

        1 Reply Last reply
        0
        • G Gourmet
          27 Nov 2018, 15:42

          Year ago I was able debug my apps with prev QtCreator 4.0.3 on my Honor 6X with Android 6. Apps were build for API level 23. Now I try do same with QtCreator 4.6.2 on same 6X but with Android 7.1. App is build for API level 26. In Creator console I get message:

          Failed to get process path. Reason:command «/opt/android-sdk-linux/platform-tools/adb» ended with code 1.

          I found possible description - on some devices the command run-as is not supported. But I tried check this in console. I have got this:

          :/opt/android-sdk-linux/platform-tools$ ./adb shell
          HWBLN-H:/ $
          HWBLN-H:/ $ run-as com.myname.myapp pwd
          run-as: Package 'com.myname.myapp' is not debuggable
          1|HWBLN-H:/ $

          What??? Why my app is not debuggable? I have definitely build app with Debug turned on and with debug server added (option in Projects settings). What is wrong with this app? The run-as command works. But what should I do to allow debug my app?

          J Offline
          J Offline
          J.Hilk
          Moderators
          wrote on 28 Nov 2018, 10:20 last edited by
          #4

          hi @Gourmet

          AFAIK this is a QtCreator bug, you'll need aversion prior to 4.6 for the build in android debugger to work like it's expected.
          Iirc the debug-concept is beeing overhauled to even work differently in principel. And that's causing issues. But don't quote me on this one.


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          G 1 Reply Last reply 5 Dec 2018, 13:48
          0
          • J J.Hilk
            28 Nov 2018, 10:20

            hi @Gourmet

            AFAIK this is a QtCreator bug, you'll need aversion prior to 4.6 for the build in android debugger to work like it's expected.
            Iirc the debug-concept is beeing overhauled to even work differently in principel. And that's causing issues. But don't quote me on this one.

            G Offline
            G Offline
            Gourmet
            wrote on 5 Dec 2018, 13:48 last edited by Gourmet 12 May 2018, 13:51
            #5

            Is anything known about QtCreator 4.7 released at July? Was this bug fixed?

            J 1 Reply Last reply 6 Dec 2018, 06:07
            0
            • G Gourmet
              5 Dec 2018, 13:48

              Is anything known about QtCreator 4.7 released at July? Was this bug fixed?

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 6 Dec 2018, 06:07 last edited by
              #6

              @Gourmet said in Cannot debug apps:

              Is anything known about QtCreator 4.7 released at July?

              Sure, here change log for 4.7.2 : https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/dist/changes-4.7.2.md?h=4.7
              Same way you can find it for older versions.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              G 1 Reply Last reply 6 Dec 2018, 18:51
              2
              • J jsulm
                6 Dec 2018, 06:07

                @Gourmet said in Cannot debug apps:

                Is anything known about QtCreator 4.7 released at July?

                Sure, here change log for 4.7.2 : https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/dist/changes-4.7.2.md?h=4.7
                Same way you can find it for older versions.

                G Offline
                G Offline
                Gourmet
                wrote on 6 Dec 2018, 18:51 last edited by
                #7

                @jsulm but I do not see anything about this bug in 4.7.0/1/2 change logs.

                R 1 Reply Last reply 6 Dec 2018, 19:04
                0
                • G Gourmet
                  6 Dec 2018, 18:51

                  @jsulm but I do not see anything about this bug in 4.7.0/1/2 change logs.

                  R Offline
                  R Offline
                  raven-worx
                  Moderators
                  wrote on 6 Dec 2018, 19:04 last edited by
                  #8

                  @Gourmet
                  make sure you are using the default debug certificate to sign the apk.

                  Regarding QtCreator:
                  You can also try using QtCreator 4.5. Since Qt Creator 4.6 the mechanism how the debug server is deployed on the device has changed (to the same what Android Studio does).
                  More can be read here

                  --- 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

                  G 1 Reply Last reply 8 Dec 2018, 14:31
                  0
                  • R raven-worx
                    6 Dec 2018, 19:04

                    @Gourmet
                    make sure you are using the default debug certificate to sign the apk.

                    Regarding QtCreator:
                    You can also try using QtCreator 4.5. Since Qt Creator 4.6 the mechanism how the debug server is deployed on the device has changed (to the same what Android Studio does).
                    More can be read here

                    G Offline
                    G Offline
                    Gourmet
                    wrote on 8 Dec 2018, 14:31 last edited by Gourmet 12 Aug 2018, 14:34
                    #9

                    @raven-worx I am sure all is ok with debug certificate. I debugged my apps in QtCreator 4.0.3. Nothing changed in apps settings. About QtCreator 4.5 - Will it work well with apps assembled for API level 26 (Android 8.0) or higher?

                    But what means this message?

                    run-as: Package 'com.myname.myapp' is not debuggable

                    G R 2 Replies Last reply 8 Dec 2018, 14:33
                    0
                    • G Gourmet
                      8 Dec 2018, 14:31

                      @raven-worx I am sure all is ok with debug certificate. I debugged my apps in QtCreator 4.0.3. Nothing changed in apps settings. About QtCreator 4.5 - Will it work well with apps assembled for API level 26 (Android 8.0) or higher?

                      But what means this message?

                      run-as: Package 'com.myname.myapp' is not debuggable

                      G Offline
                      G Offline
                      Gourmet
                      wrote on 8 Dec 2018, 14:33 last edited by
                      #10
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • G Gourmet
                        8 Dec 2018, 14:31

                        @raven-worx I am sure all is ok with debug certificate. I debugged my apps in QtCreator 4.0.3. Nothing changed in apps settings. About QtCreator 4.5 - Will it work well with apps assembled for API level 26 (Android 8.0) or higher?

                        But what means this message?

                        run-as: Package 'com.myname.myapp' is not debuggable

                        R Offline
                        R Offline
                        raven-worx
                        Moderators
                        wrote on 8 Dec 2018, 16:38 last edited by
                        #11

                        @Gourmet said in Cannot debug apps:

                        But what means this message?
                        run-as: Package 'com.myname.myapp' is not debuggable

                        i think this is because you need to mark it as such in the AndroidManifest (in the application tag)

                        --- 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
                        1
                        • J Offline
                          J Offline
                          J.Hilk
                          Moderators
                          wrote on 20 Dec 2018, 06:39 last edited by
                          #12

                          To whoever else comes across this thread,

                          here's the official bug-report regarding this issue:

                          https://bugreports.qt.io/browse/QTCREATORBUG-20379


                          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                          Q: What's that?
                          A: It's blue light.
                          Q: What does it do?
                          A: It turns blue.

                          1 Reply Last reply
                          2

                          • Login

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