Connect my Android HP tablet to Qt Creator
-
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:
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:
Now what is the problem please?
What else should I do? -
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:
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:
Now what is the problem please?
What else should I do?@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 ;-)
-
@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 ;-)
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?
:( -
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?
:(@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?
-
@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?
-
Hi,
Please see is you are filling this requirements, especiallyOn 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.
-
Hi,
Please see is you are filling this requirements, especiallyOn 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.
@LeLev @J-Hilk
Thank you both.I installed ADB Driver Installer (Universal), restarted Windows and Qt Creator showed my real HP device:
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. -
I also installed Gradle 5.1 and re-tested the program. The strange thing is that I got those similar errors once again!
-
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:
Do you have any idea what they are and should they be solved too?