Qt5.2-android: Fail to debugging app in qtcreator 3.0
-
Hello everyone,
Recently I want to write apps for andriod using Qt5.2, I wrote a very simple widget based test app using qtcreator 3.0 in a ubuntu 12.04 x64 machine, the app "run" perfectly in the android virtual device, but I failed to "debugging" the app in the android virtual device, the message in 'Application Output' panel of qtcreator tell me:Debugging starts Unable to start 'org.qtproject.example.testAndroid'.Debugging has failed Debugging has finished Then I check the log message by 'adb logcat > log.txt', it seems that Qt time out when waiting for pong file due to an exception has occurred at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(), and the exception was thrown in QtActivityDelegate.startApplication().
bq. I/Qt JAVA ( 4662): DEBUGGER: waiting for pong at /data/local/tmp/qt/debug-pong-org.qtproject.example.testAndroid, attempt 142
I/Qt JAVA ( 4662): DEBUGGER: go to sleep
I/Qt JAVA ( 4662): DEBUGGER: waiting for pong at /data/local/tmp/qt/debug-pong-org.qtproject.example.testAndroid, attempt 143
I/Qt JAVA ( 4662): DEBUGGER: go to sleep
I/Qt JAVA ( 4662): DEBUGGER: waiting for pong at /data/local/tmp/qt/debug-pong-org.qtproject.example.testAndroid, attempt 144
I/Qt JAVA ( 4662): DEBUGGER: go to sleep
I/Qt JAVA ( 4662): DEBUGGER: waiting for pong at /data/local/tmp/qt/debug-pong-org.qtproject.example.testAndroid, attempt 145
I/Qt JAVA ( 4662): DEBUGGER: go to sleep
I/Qt JAVA ( 4662): DEBUGGER: waiting for pong at /data/local/tmp/qt/debug-pong-org.qtproject.example.testAndroid, attempt 146
I/Qt JAVA ( 4662): DEBUGGER: go to sleep
I/Qt JAVA ( 4662): DEBUGGER: waiting for pong at /data/local/tmp/qt/debug-pong-org.qtproject.example.testAndroid, attempt 147
I/Qt JAVA ( 4662): DEBUGGER: go to sleep
I/Qt JAVA ( 4662): DEBUGGER: waiting for pong at /data/local/tmp/qt/debug-pong-org.qtproject.example.testAndroid, attempt 148
I/Qt JAVA ( 4662): DEBUGGER: go to sleep
I/Qt JAVA ( 4662): DEBUGGER: waiting for pong at /data/local/tmp/qt/debug-pong-org.qtproject.example.testAndroid, attempt 149
I/Qt JAVA ( 4662): DEBUGGER: go to sleep
I/Qt JAVA ( 4662): DEBUGGER: time out when waiting for pong file
W/System.err( 4662): java.lang.Exception:
W/System.err( 4662): at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:239)
W/System.err( 4662): at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:522)
W/System.err( 4662): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:744)
W/System.err( 4662): at android.app.Activity.performCreate(Activity.java:5231)
W/System.err( 4662): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
W/System.err( 4662): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
W/System.err( 4662): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
W/System.err( 4662): at android.app.ActivityThread.access$800(ActivityThread.java:135)
W/System.err( 4662): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
W/System.err( 4662): at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 4662): at android.os.Looper.loop(Looper.java:136)
W/System.err( 4662): at android.app.ActivityThread.main(ActivityThread.java:5017)
W/System.err( 4662): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 4662): at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err( 4662): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
W/System.err( 4662): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
W/System.err( 4662): at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 4662): GC_CONCURRENT freed 373K, 13% free 3034K/3484K, paused 15ms+3ms, total 43ms
D/dalvikvm( 4662): WAIT_FOR_CONCURRENT_GC blocked 15ms
I/dalvikvm-heap( 4662): Grow heap (frag case) to 3.642MB for 635812-byte allocation
D/dalvikvm( 4662): GC_FOR_ALLOC freed 10K, 12% free 3644K/4108K, paused 41ms, total 46ms
I/Choreographer( 4662): Skipped 48 frames! The application may be doing too much work on its main thread.But I don't know what to do, I need some help, thanks! BTW, Is it possible for me to debug into QtActivityDelegate.java by qtcreator? Best Regards
-
I have come across the same problem trying to run the examples. When it tries to run the application a dialog box pops up and says, "The gdb process terminated". However, I can run the deployed application on the device fine. Any ideas?
I fixed my problem by switching to the r8e NDK.