Can QtCreator 2.8 debug QML on Android device from Windows?
-
I am trying to make sure I have a working Qt5.1 development environment for Android QML development from a Windows 7 PC. I created a new project from the "Qt Quick 2 Application (Built-in Types)" template and just left the default "Hello World" QML app as is. I was able to build and deploy this app to my Android 4.0.4 tablet and run it from QtCreator (2.8 and 2.7.2) without issue. The trouble I have is that I cannot launch it attached to the QtCreator debugger. If I tell QtCreator to debug this app, I get a warning dialog box that says "this does not seem to be a Debug build" followed by a bunch of lines similar to this "Section .debug_info: Not found." I then get a dialog box that says "The gdb process terminated". The "Application output" window in QtCreator shows a whole bunch of lines like this:
I/Qt JAVA (13345): DEBUGGER: waiting for pong at /data/local/tmp/qt/debug-pong-org.qtproject.example.try1, attempt 139
I/Qt JAVA (13345): DEBUGGER: go to sleepShould I expect to be able to debug a QML app this way, or is this not yet supported?
Have others been able to remote debug QML from Window to an Android device?I am using the Android r9 NDK and a recent Android SDK.
-
I get to answer my own question.
I had two problems. The first problem was with the version of arm-linux-androideabi-gdb.exe that is in Android r9 NDK (android-ndk-r9\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\bin\arm-linux-androideabi-gdb.exe). This version depends on libpython2.7.dll which is not in my path nor is it in with arm-linux-androideabi-gdb.exe. I did find it in android-ndk-r9\prebuilt\windows\bin, so I copied into the same directory as androideabi-gdb.exe, so now it works for me.
The second problem is that apparently you can't debug remotely to an android device if the Deploy configuration is set to "Bundle Qt libraries in APK". Changing that to "Deploy local Qt libraries to temporary directory" allowed the debugger to work.