Important: Please read the Qt Code of Conduct -

Getting strange error when i try to debug QML application on android device, but debug works fine on desktop device?

  • Hi All, iam Getting below error when i try to debug QML application on android device ,but debug works fine on desktop device. the whole android debug setup used to work fine from last several months, but from last two days it is giving below i can solve this?

    Connecting to remote server failed:
    Remote communication error.  Target disconnected.: Connection reset by peer.
    EDIT : also sometimes getting below error 
    Could not connect to the in-process QML debugger.Do you want to retry?

  • @divaindie

    What is the Android version?
    What is the Qt lib version you are using?

  • android is api 27
    and Qt version is 5.11.1

  • @divaindie

    I cannot use the debugger effieciently with this API level and Qt 5.11 and Qt 5.12 in cooperation with my Android devices. Basically the only thing operational is startingh my devices with Ctrl+r and the standard reporting to the application window in creator including the qDebug() output I am adding to my application. IIRC I had similar error message when trying to use the debugger.

    Therefore, I think you might have changed something lately in your setup for building and debugging.
    In my case I can use the very same setup with a lower API level Android 5 and a device with that Android version.

  • thank you for reply.
    I thought i had changed something in sdk /ndk android setup ,so i have updated both sdk and ndk packages via android studio and then i had installed qt5.12.2,but still not able to run/debug on android .
    iam getting below error when i try to compile my application . this error is different than previous error which i have posted ,also iam not getting previous error anymore!! (thats strange!!)

    Command does not exist: /home/user/Android/NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readobj
    Command does not exist: /home/user/Android/NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readobj
    Command does not exist: /home/user/Android/NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-readobj

    someone please help me !!

  • @divaindie

    My guess is that it is most likely a compatibility issue with Android SDK and NDK.

    I am on windows and when switching from Qt5.11 to Qt5.12 I need to change also SDK and NDK versions. With Qt 5.12.1 I am using 0_1554888796202_c675680f-ef78-4e07-ac18-aca3a1c9c281-image.png
    That is working fine on windows 10.

    You need to check in creator under "Options"->"Devices" under "Android Settings" what you are actually using and report here.
    What is the OS you are using for compilation?

  • iam using ubuntu 16.04 ,also in options->devices it is showing

    Android settings are OK. (SDK Version: 26.1.1, NDK Version: 15.1.4119039)

    edit :
    i think it was due to NDK version ,it was 15.1 earlier .i think because of that it was giving error !!
    now i changed it to

    Android settings are OK. (SDK Version: 26.1.1, NDK Version: 19.2.5345600)

    now it is working fine , iam able to debug and run ..

    thanks All for the support ..

Log in to reply