无法调试Qt Android Project

时间:2018-05-17 17:39:38

标签: android qt debugging

我有一个Qt应用程序,我在windows和android上编译。(使用Qt Creator 4.6.0和Qt 5.10.1,Android SDK27)

问题是调试输出没有打印在Android版本的控制台上。在仿真器或真实设备上也是如此。没有qDebug输出。但我可以在控制台上看到一些Java输出。据我所知,编辑器可以连接到调试服务器:

I zygote  : Do partial code cache collection, code=60KB, data=53KB
I zygote  : After code cache collection, code=59KB, data=53KB
I zygote  : Increasing code cache capacity to 256KB
I zygote  : Do full code cache collection, code=121KB, data=90KB
I zygote  : After code cache collection, code=106KB, data=66KB
W linker  : "/data/app/org.mikrodev.vpclient-WMiXF2CO37aeO1BnWi5xGg==/lib/x86/libViewPLUSClient.so" unused DT entry: type 0xf arg 0x116483
D         : (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
I Qt JAVA : DEBUGGER: extra parameters: Bundle[{debug_ping=true, gdbserver_socket=/data/data/org.mikrodev.vpclient/debug-socket, qml_debug=true, gdbserver_command=/data/data/org.mikrodev.vpclient/lib/libgdbserver.so --multi +/data/data/org.mikrodev.vpclient/debug-socket, qmljsdebugger=port:6680,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector, ping_socket=org.mikrodev.vpclient.ping_pong_socket}]
I Qt JAVA : DEBUGGER: removing gdb socket /data/data/org.mikrodev.vpclient/debug-socket
I Qt JAVA : DEBUGGER: starting /data/user/0/org.mikrodev.vpclient/lib/libgdbserver.so --multi +/data/data/org.mikrodev.vpclient/debug-socket
I Qt JAVA : DEBUGGER: gdbserver started
I Qt JAVA : DEBUGGER: waiting for socket at /data/data/org.mikrodev.vpclient/debug-socket, attempt 0
I Qt JAVA : DEBUGGER: socket ok
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Debug socket accepted
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Waiting for debug socket connect
I Qt JAVA : DEBUGGER: go to sleep
I Qt JAVA : DEBUGGER: Incoming socket OK
I Qt JAVA : DEBUGGER: Got pid acknowledgment
I Qt JAVA : DEBUGGER: ping not requested
I Qt JAVA : DEBUGGER: pong not requested
D OpenGLRenderer: HWUI GL Pipeline
I OpenGLRenderer: Initialized EGL, version 1.4
D OpenGLRenderer: Swap behavior 1
D gralloc_ranchu: Emulator without host-side GPU emulation detected. Loading gralloc.default.so from /vendor/lib/hw/gralloc.default.so...
W linker  : "/data/data/org.mikrodev.vpclient/qt-reserved-files/plugins/styles/libqandroidstyle.so" has unsupported flags DT_FLAGS_1=0x81
D NetworkSecurityConfig: No Network Security Config specified, using platform default
I zygote  : Do partial code cache collection, code=120KB, data=81KB
I zygote  : After code cache collection, code=120KB, data=81KB
I zygote  : Increasing code cache capacity to 512KB

我可以看到一些QML和Android特定的调试输出,如:

I zygote  : NativeAllocBackground concurrent copying GC freed 52(47KB) AllocSpace objects, 0(0B) LOS objects, 60% free, 990KB/2MB, paused 641us total 106.181ms
W zygote  : Attempt to remove non-JNI local reference, dumping thread
I chromium: [INFO:CONSOLE(734)] "Uncaught InvalidStateError: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.", source: file:///data/user/0/org.mikrodev.vpclient/files/ScadaProjects/untitled2/images/map_1526578461228.html (734)
W zygote  : Attempt to remove non-JNI local reference, dumping thread
I chromium: [INFO:CONSOLE(734)] "Uncaught InvalidStateError: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.", source: file:///data/user/0/org.mikrodev.vpclient/files/ScadaProjects/untitled2/images/map_1526578461228.html (734)
I chatty  : uid=10085(u0_a85) org.mikrodev.vpclient identical 2 lines
I chromium: [INFO:CONSOLE(734)] "Uncaught InvalidStateError: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.", source: file:///data/user/0/org.mikrodev.vpclient/files/ScadaProjects/untitled2/images/map_1526578461228.html (734)
I zygote  : NativeAllocBackground concurrent copying GC freed 47(62KB) AllocSpace objects, 0(0B) LOS objects, 60% free, 1023KB/2MB, paused 6.261ms total 87.462ms
W zygote  : Attempt to remove non-JNI local reference, dumping thread
I chatty  : uid=10085(u0_a85) org.mikrodev.vpclient identical 17 lines
W zygote  : Attempt to remove non-JNI local reference, dumping thread
W zygote  : Attempt to remove non-JNI local reference, dumping thread
I chatty  : uid=10085(u0_a85) org.mikrodev.vpclient identical 9 lines
W zygote  : Attempt to remove non-JNI local reference, dumping thread
W zygote  : Attempt to remove non-JNI local reference, dumping thread
I chatty  : uid=10085(u0_a85) org.mikrodev.vpclient identical 3 lines
W zygote  : Attempt to remove non-JNI local reference, dumping thread
I zygote  : Do partial code cache collection, code=243KB, data=156KB
I zygote  : After code cache collection, code=243KB, data=156KB
I zygote  : Increasing code cache capacity to 1024KB
W zygote  : Attempt to remove non-JNI local reference, dumping thread
I chatty  : uid=10085(u0_a85) org.mikrodev.vpclient identical 10 lines
W zygote  : Attempt to remove non-JNI local reference, dumping thread

但是没有打印qDebug()或qWarning()输出。我如何获得qDebug()输出?

0 个答案:

没有答案