Cannot debug apps
-
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?
-
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.) -
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. -
@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. -
-
@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
-
@Gourmet said in Cannot debug apps:
But what means this message?
run-as: Package 'com.myname.myapp' is not debuggablei think this is because you need to mark it as such in the AndroidManifest (in the application tag)
-
To whoever else comes across this thread,
here's the official bug-report regarding this issue: