Unsolved Unable to connect with remote debugger
-
Hello,
I'm trying to debug an application on an Android mobile but I can't...
A message appears on my mobile (indicating "waiting for debugger") then closes after a few seconds. On my mobile, the program continues its execution..
I can start an Android application from qtCreator... But it's impossible to debug it...
I can also communicate with the mobile using adb...The debugger is well injected in the apk file
However, on the QtCreator side, I get the message "Remote communication error. Target disconnected: no error.". The debugging stops and I can't continue...
I get the following log
I/ActivityManager( 1809): Start proc net.essai for activity net.essai/org.qtproject.qt5.android.bindings.QtActivity: pid=15027 uid=10004 gids={50004, 9997, 3003, 1028, 1015} abi=armeabi-v7a W/ActivityThread(15027): Application net.essai is waiting for the debugger on port 8100... I/System.out(15027): Sending WAIT chunk I/art (15027): Debugger is active I/System.out(15027): Debugger has connected I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): debugger has settled (1426)
I unchecked the "enable QML" option in "debugger settings" and enabled the "usb debugging" option on my Android device. I did some tests under linux and Windows with two different mobiles and I get the same thing...
I use :
QtCreator 4.7.0
Android SDK build-tools 28.0.2
NDK 17.1.4828580What's going on? What's going on?
With my thanks...
-
Am I the only one with these problems with Android debugging?
-
Hi,
You should add which version of Qt you are using and which version of Android you are running.
You should also try a less recent version of the NDK. Android folks tends to break stuff for third parties when releasing new NDKs.
See the Android Getting Started guide in Qt's documentation.
-
I'm using Qt 5.11.1 and I'm using hardwares running with Android 5.0 and 8.0
Thanks for the advice: I'll try with an older version of the NDK.
-
I followed the tips on the "Android Getting Started guide" page and I use now the NDK version 10e but I still can't launch the application on my device in debug mode.
I still get the error message: "Remote communication error. Target disconnected: no error."
and the same logI/ActivityManager( 1809): Start proc net.essai for activity net.essai/org.qtproject.qt5.android.bindings.QtActivity: pid=15027 uid=10004 gids={50004, 9997, 3003, 1028, 1015} abi=armeabi-v7a W/ActivityThread(15027): Application net.essai is waiting for the debugger on port 8100... I/System.out(15027): Sending WAIT chunk I/art (15027): Debugger is active I/System.out(15027): Debugger has connected I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): waiting for debugger to settle... I/System.out(15027): debugger has settled (1426)
Did I forget something?
Thanks !
-
I also tried with qtcreator 4.5.2 but without more success...
-
Can you debug using Android Studio ?
-
no. I'm using qtcreator. Is it possible to load a project at (pro file) in android studio?
-
No it's not, Android Studio is dedicated to Android Java development. The proposition is to check whether their IDE can properly debug to ensure that you have everything working correctly on their side.
-
If... After a test, I can debug from android studio but I miss the debug symbols...
-
In the QtCreator settings, how to insert debugging symbols in the apk file?
I use the Qmake parameters:
qmake essai.pro -spec android-g++ CONFIG+=debug CONFIG+=qml_debug && /root/Android/Sdk/ndk-bundle/prebuilt/linux-x86_64/bin/make qmake_all
Thanks !
-
Any update in this thread? I'm having the same problem