Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Connect my Android HP tablet to Qt Creator

Connect my Android HP tablet to Qt Creator

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by
    #1

    Hi all,

    I got a tablet model HP Slate 10 HD running Android 4.4.2 version and connected that to my Windows 7 x64 using a USB cable and it's shown on my computer now.

    I wanted to connect it to Qt Creator 4.8.0 (Qt 5.12) for running/debugging Android programs I'm dealing with. For that purpose I went for these instructions.

    Here's my Devices:

    0_1546853712959_Capture.PNG

    I also downloaded gradle-5.1-all and latest_usb_driver_windows, but there's no setup file in them to install.

    Now when I run my app using the Arm7 kit, it shows nothing, although I have enabled the developer mode on my tablet:

    0_1546853876194_Capture.PNG

    Now what is the problem please?
    What else should I do?

    J.HilkJ 1 Reply Last reply
    0
    • tomyT tomy

      Hi all,

      I got a tablet model HP Slate 10 HD running Android 4.4.2 version and connected that to my Windows 7 x64 using a USB cable and it's shown on my computer now.

      I wanted to connect it to Qt Creator 4.8.0 (Qt 5.12) for running/debugging Android programs I'm dealing with. For that purpose I went for these instructions.

      Here's my Devices:

      0_1546853712959_Capture.PNG

      I also downloaded gradle-5.1-all and latest_usb_driver_windows, but there's no setup file in them to install.

      Now when I run my app using the Arm7 kit, it shows nothing, although I have enabled the developer mode on my tablet:

      0_1546853876194_Capture.PNG

      Now what is the problem please?
      What else should I do?

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @tomy did you enable usb-debugging in the settings (developer settings) of your android device? It' is it's own point.

      And you have to "trust" the pc as well, so that files can be exchanged.

      from a quick google search, I get, that the slate has a arm processors so you should be fine with your kit, at least ;-)


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      tomyT 1 Reply Last reply
      1
      • J.HilkJ J.Hilk

        @tomy did you enable usb-debugging in the settings (developer settings) of your android device? It' is it's own point.

        And you have to "trust" the pc as well, so that files can be exchanged.

        from a quick google search, I get, that the slate has a arm processors so you should be fine with your kit, at least ;-)

        tomyT Offline
        tomyT Offline
        tomy
        wrote on last edited by tomy
        #3

        @J.Hilk

        did you enable usb-debugging in the settings (developer settings) of your android device? It' is it's own point.

        Hi, Hilk.
        Yeah, I've ticked that checkbox saying:
        Developer Options -> DEBUGGING -> USB debugging -> Debug mode when USB is connected.
        All other options are unchecked.

        And you have to "trust" the pc as well, so that files can be exchanged.

        What do you mean by that please?

        from a quick google search, I get, that the slate has a arm processors so you should be fine with your kit, at least ;-)

        Yeah, but I still don't know why it's not working. There might be a problem with the Windows driver.
        And where are those two gradle-5.1-all and latest_usb_driver_windows used in the issue?
        :(

        J.HilkJ 1 Reply Last reply
        0
        • tomyT tomy

          @J.Hilk

          did you enable usb-debugging in the settings (developer settings) of your android device? It' is it's own point.

          Hi, Hilk.
          Yeah, I've ticked that checkbox saying:
          Developer Options -> DEBUGGING -> USB debugging -> Debug mode when USB is connected.
          All other options are unchecked.

          And you have to "trust" the pc as well, so that files can be exchanged.

          What do you mean by that please?

          from a quick google search, I get, that the slate has a arm processors so you should be fine with your kit, at least ;-)

          Yeah, but I still don't know why it's not working. There might be a problem with the Windows driver.
          And where are those two gradle-5.1-all and latest_usb_driver_windows used in the issue?
          :(

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @tomy said in Connect my Android HP tablet to Qt Creator:

          And you have to "trust" the pc as well, so that files can be exchanged.

          What do you mean by that please?

          well, usually, when you connect your phone/tablet to a pc, you get a popup with a text along the lines of:
          "Do you trust this pc?" A sequerty question, to prevent unauthorized access to your device.

          I'm unsure when this was introtuced to andoid, it may not be in 4.4.

          can you access the device from your pc? transfer files etc?


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          tomyT 1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @tomy said in Connect my Android HP tablet to Qt Creator:

            And you have to "trust" the pc as well, so that files can be exchanged.

            What do you mean by that please?

            well, usually, when you connect your phone/tablet to a pc, you get a popup with a text along the lines of:
            "Do you trust this pc?" A sequerty question, to prevent unauthorized access to your device.

            I'm unsure when this was introtuced to andoid, it may not be in 4.4.

            can you access the device from your pc? transfer files etc?

            tomyT Offline
            tomyT Offline
            tomy
            wrote on last edited by
            #5

            @J.Hilk

            I'm unsure when this was introtuced to andoid, it may not be in 4.4.

            Yes, you're right. I didn't see such a message, of course, I'd trust if it popped up.

            can you access the device from your pc? transfer files etc?

            Yes, and yes.

            1 Reply Last reply
            0
            • ODБOïO Offline
              ODБOïO Offline
              ODБOï
              wrote on last edited by
              #6

              Hi,
              Please see is you are filling this requirements, especially

              On Windows, you also need the following:
              Android Debug Bridge (ADB) driver on the Windows platform to enable USB debugging. The default USB driver on Windows does not allow debugging. For more information about obtaining the USB driver, see http://developer.android.com/sdk/win-usb.html.
              
              tomyT 1 Reply Last reply
              2
              • ODБOïO ODБOï

                Hi,
                Please see is you are filling this requirements, especially

                On Windows, you also need the following:
                Android Debug Bridge (ADB) driver on the Windows platform to enable USB debugging. The default USB driver on Windows does not allow debugging. For more information about obtaining the USB driver, see http://developer.android.com/sdk/win-usb.html.
                
                tomyT Offline
                tomyT Offline
                tomy
                wrote on last edited by
                #7

                @LeLev @J-Hilk
                Thank you both.

                I installed ADB Driver Installer (Universal), restarted Windows and Qt Creator showed my real HP device:

                0_1546878761710_Capture.PNG

                Then tried to test an example (Custom Widget) from the QML book on it. The program works fine using the Desktop kit, but for the Android device I get these errors:

                initializing deployment to Android device/simulator
                Deploying to 6CY34302TN
                20:09:38: Running steps for project CustomWidget...
                20:09:38: Configuration unchanged, skipping qmake step.
                20:09:38: Starting: "D:\android-ndk-r17c\prebuilt\windows-x86_64\bin\make.exe" -j4
                make: Nothing to be done for `first'.
                20:09:38: The process "D:\android-ndk-r17c\prebuilt\windows-x86_64\bin\make.exe" exited normally.
                20:09:38: Removing directory
                C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\build-CustomWidget-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build/assets
                20:09:38: Removing directory C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\build-CustomWidget-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build/libs
                20:09:38: Starting: "D:\android-ndk-r17c\prebuilt\windows-x86_64\bin\make.exe" "INSTALL_ROOT=C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\build-CustomWidget-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build" install

                C:\Qt\5.12.0\android_armv7\bin\qmake.exe -install qinstall -exe libCustomWidget.so C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\build-CustomWidget-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\libs\armeabi-v7a\libCustomWidget.so
                20:09:39: The process "D:\android-ndk-r17c\prebuilt\windows-x86_64\bin\make.exe" exited normally.
                20:09:39: Starting: "C:\Qt\5.12.0\android_armv7\bin\androiddeployqt.exe" --input C:/Users/Abbasi/Desktop/Q_Apps/QML_Apps/build-CustomWidget-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug/android-libCustomWidget.so-deployment-settings.json --output C:/Users/Abbasi/Desktop/Q_Apps/QML_Apps/build-CustomWidget-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug/android-build --android-platform android-28 --jdk "C:/Program Files/Java/jdk1.8.0_191" --gradle

                Generating Android Package
                Input file: C:/Users/Abbasi/Desktop/Q_Apps/QML_Apps/build-CustomWidget-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug/android-libCustomWidget.so-deployment-settings.json
                Output directory: C:/Users/Abbasi/Desktop/Q_Apps/QML_Apps/build-CustomWidget-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug/android-build/
                Application binary: C:/Users/Abbasi/Desktop/Q_Apps/QML_Apps/build-CustomWidget-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug/libCustomWidget.so

                Android build platform: android-28
                Install to device: No

                *FAILURE: Build failed with an exception.*

                *What went wrong:*
                *A problem occurred configuring root project 'android-build'.* *Could not resolve all artifacts for configuration ':classpath'.* *Could not resolve com.android.tools.build:gradle:3.2.0.* *Required by:* *project :* *Could not resolve com.android.tools.build:gradle:3.2.0.* *Could not get resource* *'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'. > Could not GET* 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.2.0/gradle-3.2.0.pom'.
                *> Connect to jcenter.bintray.com:443* *[jcenter.bintray.com/75.126.118.188] failed: Connection refused: connect*

                *Try:* *Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.*

                *Get more help at https://help.gradle.org*

                *BUILD FAILED in 25s*
                -- Skipping C:/Qt/5.12.0/android_armv7/plugins/iconengines/libqsvgicon.so. It has unmet dependencies: lib/libQt5Svg.so.
                -- Skipping C:/Qt/5.12.0/android_armv7/plugins/imageformats/libqsvg.so. It has unmet dependencies: lib/libQt5Svg.so.
                Building the android package failed!* *-- For more information, run this command with --verbose. 20:10:06: The process "C:\Qt\5.12.0\android_armv7\bin\androiddeployqt.exe" exited with code 14.*
                *Error while building/deploying project CustomWidget (kit: Android for armeabi-v7a (Clang Qt 5.12.0 for Android ARMv7)) When executing step "Build Android APK"
                20:10:06: Elapsed time: 00:29.

                1 Reply Last reply
                0
                • tomyT Offline
                  tomyT Offline
                  tomy
                  wrote on last edited by
                  #8

                  I also installed Gradle 5.1 and re-tested the program. The strange thing is that I got those similar errors once again!

                  1 Reply Last reply
                  0
                  • tomyT Offline
                    tomyT Offline
                    tomy
                    wrote on last edited by tomy
                    #9

                    Solved! :)

                    The problem was with Windows firewall which prevented the Gradle to download things. I disabled both firewall and antivirus temporarily and tested the program once again.
                    It was for a few minutes just showing lines: download http/ ......
                    Then it succeeded to show the app on the tablet. :)
                    Then I enabled both firewall and antivirus and tested that and also other programs. No download anymore. It seems that only one time it's required. All apps are shown on the device. :)

                    There's only few tiny red lines (apart from warnings) that make me rather worry. Here's the bottom section of the Output window:

                    0_1546892168107_Capture.PNG

                    Do you have any idea what they are and should they be solved too?

                    1 Reply Last reply
                    1

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved