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.9k 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.
  • M Offline
    M Offline
    mvuori
    wrote on 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
    1
    • M mvuori

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

        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.HilkJ Online
        J.HilkJ Online
        J.Hilk
        Moderators
        wrote on 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
        0
        • J.HilkJ J.Hilk

          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 last edited by Gourmet
          #5

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

          jsulmJ 1 Reply Last reply
          0
          • G Gourmet

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

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on 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
            2
            • jsulmJ jsulm

              @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 last edited by
              #7

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

              raven-worxR 1 Reply Last reply
              0
              • G Gourmet

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

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on 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
                0
                • raven-worxR raven-worx

                  @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 last edited by Gourmet
                  #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 raven-worxR 2 Replies Last reply
                  0
                  • G Gourmet

                    @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 last edited by
                    #10
                    This post is deleted!
                    1 Reply Last reply
                    0
                    • G Gourmet

                      @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

                      raven-worxR Offline
                      raven-worxR Offline
                      raven-worx
                      Moderators
                      wrote on 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.HilkJ Online
                        J.HilkJ Online
                        J.Hilk
                        Moderators
                        wrote on 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