Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Debugging an Android application problem



  • Hello there,
    Thanks to the folks on the forums I have already went over java problem ( https://forum.qt.io/topic/94690/could-not-determine-java-version-from-10-0-2 ) and deployment problem ( https://forum.qt.io/topic/94700/deploying-an-android-application-problem/12 ). At this point, I should be able to debug the remote android target, but I am not... here is the compile output:

    16:43:09: Running steps for project clocks...
    16:43:09: Configuration unchanged, skipping qmake step.
    16:43:09: Starting: "C:\android\android-ndk-r17c\prebuilt\windows-x86_64\bin\make.exe" -j6
    make: Nothing to be done for `first'.
    16:43:10: The process "C:\android\android-ndk-r17c\prebuilt\windows-x86_64\bin\make.exe" exited normally.
    16:43:10: Removing directory C:\Qt\Examples\Qt-5.11.1\quick\demos\build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug\android-build/assets
    16:43:10: Removing directory C:\Qt\Examples\Qt-5.11.1\quick\demos\build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug\android-build/libs
    16:43:10: Starting: "C:\android\android-ndk-r17c\prebuilt\windows-x86_64\bin\make.exe" "INSTALL_ROOT=C:\Qt\Examples\Qt-5.11.1\quick\demos\build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug\android-build" install
    C:\Qt\5.11.1\android_armv7\bin\qmake.exe -install qinstall -exe libclocks.so C:\Qt\Examples\Qt-5.11.1\quick\demos\build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug\android-build\libs\armeabi-v7a\libclocks.so
    16:43:10: The process "C:\android\android-ndk-r17c\prebuilt\windows-x86_64\bin\make.exe" exited normally.
    16:43:10: Starting: "C:\Qt\5.11.1\android_armv7\bin\androiddeployqt.exe" --input C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-libclocks.so-deployment-settings.json --output C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-build --android-platform android-28 --jdk "C:/Program Files/Java/jdk1.8.0_181" --gradle
    Generating Android Package
      Input file: C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-libclocks.so-deployment-settings.json
      Output directory: C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-build/
      Application binary: C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/libclocks.so
      Android build platform: android-28
      Install to device: No
      -- Skipping C:/Qt/5.11.1/android_armv7/plugins/iconengines/libqsvgicon.so. It has unmet dependencies: lib/libQt5Svg.so,lib/libQt5Widgets.so.
      -- Skipping C:/Qt/5.11.1/android_armv7/plugins/imageformats/libqsvg.so. It has unmet dependencies: lib/libQt5Svg.so,lib/libQt5Widgets.so.
    The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
    The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
    :preBuild UP-TO-DATE
    :preDebugBuild UP-TO-DATE
    :checkDebugManifest
    :prepareDebugDependencies
    :compileDebugAidl UP-TO-DATE
    :compileDebugRenderscript UP-TO-DATE
    :generateDebugBuildConfig UP-TO-DATE
    :generateDebugResValues UP-TO-DATE
    :generateDebugResources UP-TO-DATE
    :mergeDebugResources UP-TO-DATE
    :processDebugManifest UP-TO-DATE
    :processDebugResources UP-TO-DATE
    :generateDebugSources UP-TO-DATE
    :incrementalDebugJavaCompilationSafeguard UP-TO-DATE
    :compileDebugJavaWithJavac UP-TO-DATE
    :compileDebugNdk NO-SOURCE
    :compileDebugSources UP-TO-DATE
    :mergeDebugShaders UP-TO-DATE
    :compileDebugShaders UP-TO-DATE
    :generateDebugAssets UP-TO-DATE
    :mergeDebugAssets UP-TO-DATE
    :transformClassesWithDexForDebug UP-TO-DATE
    :mergeDebugJniLibFolders UP-TO-DATE
    :transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
    :processDebugJavaRes NO-SOURCE
    :transformResourcesWithMergeJavaResForDebug UP-TO-DATE
    :validateSigningDebug
    :packageDebug UP-TO-DATE
    :assembleDebug UP-TO-DATE
    
    BUILD SUCCESSFUL
    
    Total time: 3.933 secs
    Android package built successfully in 5.249 ms.
      -- File: C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-build//build/outputs/apk/android-build-debug.apk
    16:43:15: The process "C:\Qt\5.11.1\android_armv7\bin\androiddeployqt.exe" exited normally.
    16:43:15: Starting: "C:\Qt\5.11.1\android_armv7\bin\androiddeployqt.exe" --verbose --output C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-build --no-build --input C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-libclocks.so-deployment-settings.json --gradle --reinstall --device 0915f972ec432c02
    Generating Android Package
      Input file: C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-libclocks.so-deployment-settings.json
      Output directory: C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-build/
      Application binary: C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/libclocks.so
      Android build platform: android-28
      Install to device: 0915f972ec432c02
    Detecting dependencies of application.
    Reading dependencies from C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/libclocks.so
          lib/libQt5Quick.so
          lib/libQt5Gui.so
          lib/libQt5Qml.so
          lib/libQt5Network.so
          lib/libQt5Core.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/lib/libQt5Quick.so
          lib/libQt5Qml.so
          lib/libQt5Gui.so
          lib/libQt5Network.so
          lib/libQt5Core.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/lib/libQt5Qml.so
          lib/libQt5Network.so
          lib/libQt5Core.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/lib/libQt5Network.so
          lib/libQt5Core.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/lib/libQt5Core.so
    Appending dependency: lib/libQt5Core.so
    Reading Android dependencies for Qt5Core
    Appending dependency: lib/libQt5Network.so
    Reading Android dependencies for Qt5Network
    Appending dependency from xml: plugins/bearer/libqandroidbearer.so
    Appending dependency: lib/libQt5Qml.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/lib/libQt5Gui.so
          lib/libQt5Core.so
    Appending dependency: lib/libQt5Gui.so
    Reading Android dependencies for Qt5Qml
    Appending dependency from xml: plugins/qmltooling/libqmldbg_debugger.so
    Appending dependency from xml: plugins/qmltooling/libqmldbg_inspector.so
    Appending dependency from xml: plugins/qmltooling/libqmldbg_local.so
    Appending dependency from xml: plugins/qmltooling/libqmldbg_messages.so
    Appending dependency from xml: plugins/qmltooling/libqmldbg_native.so
    Appending dependency from xml: plugins/qmltooling/libqmldbg_nativedebugger.so
    Appending dependency from xml: plugins/qmltooling/libqmldbg_profiler.so
    Appending dependency from xml: plugins/qmltooling/libqmldbg_quickprofiler.so
    Appending dependency from xml: plugins/qmltooling/libqmldbg_server.so
    Appending dependency from xml: plugins/qmltooling/libqmldbg_tcp.so
    Reading Android dependencies for Qt5Gui
    Appending dependency from xml: plugins/platforms/android/libqtforandroid.so
    Appending dependency from xml: plugins/iconengines/libqsvgicon.so
    Appending dependency from xml: plugins/imageformats/libqgif.so
    Appending dependency from xml: plugins/imageformats/libqicns.so
    Appending dependency from xml: plugins/imageformats/libqico.so
    Appending dependency from xml: plugins/imageformats/libqjpeg.so
    Appending dependency from xml: plugins/imageformats/libqsvg.so
    Appending dependency from xml: plugins/imageformats/libqtga.so
    Appending dependency from xml: plugins/imageformats/libqtiff.so
    Appending dependency from xml: plugins/imageformats/libqwbmp.so
    Appending dependency from xml: plugins/imageformats/libqwebp.so
    Appending dependency: lib/libQt5Quick.so
    Reading Android dependencies for Qt5Quick
    Appending dependency from xml: lib/libQt5QuickParticles.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/plugins/platforms/android/libqtforandroid.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/plugins/bearer/libqandroidbearer.so
          lib/libQt5Network.so
          lib/libQt5Core.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/plugins/platforms/android/libqtforandroid.so
          lib/libQt5Gui.so
          lib/libQt5Core.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/lib/libQt5QuickParticles.so
          lib/libQt5Quick.so
          lib/libQt5Qml.so
          lib/libQt5Gui.so
          lib/libQt5Network.so
          lib/libQt5Core.so
    Scanning for QML imports.
      -- Adding 'C:/Qt/5.11.1/android_armv7/qml/QtQuick.2' as QML dependency
        -- Appending dependency found by qmlimportscanner: C:/Qt/5.11.1/android_armv7/qml/QtQuick.2/libqtquick2plugin.so
    Reading dependencies from C:/Qt/5.11.1/android_armv7/qml/QtQuick.2/libqtquick2plugin.so
          lib/libQt5Quick.so
          lib/libQt5Qml.so
          lib/libQt5Gui.so
          lib/libQt5Network.so
          lib/libQt5Core.so
        -- Appending dependency found by qmlimportscanner: C:/Qt/5.11.1/android_armv7/qml/QtQuick.2/plugins.qmltypes
        -- Appending dependency found by qmlimportscanner: C:/Qt/5.11.1/android_armv7/qml/QtQuick.2/qmldir
      -- Adding 'C:/Qt/Examples/Qt-5.11.1/quick/demos/clocks/clocks.qml/content' as QML dependency
        -- Skipping because file does not exist.
    Copying STL library
      -- Skipping file C:\android\android-ndk-r17c/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_shared.so. Same or newer file already in place.
    Copying 33 dependencies from Qt into package.
    Installing Android package to device.
    Running command "C:/android/android-sdk/platform-tools/adb.exe -s 0915f972ec432c02  install -r C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-build//build/outputs/apk/android-build-debug.apk"
    Success
    Android package built successfully in 3.246 ms.
      -- It can now be run from the selected device/emulator.
      -- File: C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/android-build//build/outputs/apk/android-build-debug.apk
    16:43:19: The process "C:/Qt/5.11.1/android_armv7/bin/androiddeployqt.exe" exited normally.
    16:43:19: Pulling files necessary for debugging.
    16:43:19: Package deploy: Running command "C:/android/android-sdk/platform-tools/adb.exe -s 0915f972ec432c02 pull /system/bin/app_process32 C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/app_process".
    16:43:19: Package deploy: Running command "C:/android/android-sdk/platform-tools/adb.exe -s 0915f972ec432c02 pull /system/bin/linker C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/linker".
    16:43:19: Package deploy: Running command "C:/android/android-sdk/platform-tools/adb.exe -s 0915f972ec432c02 pull /system/lib/libc.so C:/Qt/Examples/Qt-5.11.1/quick/demos/build-clocks-Android_for_armeabi_v7a_GCC_4_9_Qt_5_11_1_for_Android_armv7-Debug/libc.so".
    16:43:19: Elapsed time: 00:10.
    

    It succedds. The problem is in the application output:

    Failed to get process path. Reason: The command "C:\android\android-sdk\platform-tools\adb.exe" terminated with exit code -1..
    
    ... and after some time...
    
    "org.qtproject.example.clocks" died.
    

    I get the same output on both windows and linux platform.
    Many obstacles if one wants to develop qt apps for android... I would really appreciate all help here.


Log in to reply