Can't run Qt app on physical mobile device
-
Hi All,
I am trying to build and run Qt app on andoid .seems likes it's building but I am not able to cheack it as it wont run . When I try to compile it , It compiles fine but when I try to run it , it wont run and I get this error:-
Cannot find the android build step. Error while building/deploying project calqlatr (kit: Android for armeabi-v7a (GCC 4.9, Qt (android_armv7))) When executing step "Deploy to Android device"
I had also post this on stack-overflow . here is the link:- https://stackoverflow.com/questions/50434018/cant-run-android-app-in-qtcreator?noredirect=1#comment87888043_50434018
I am new to qt and specially to android
I am using arch Linux
-
@noone said in Can't run Qt app on physical mobile device:
Error while building/deploying project calqlatr (kit: Android for armeabi-v7a (GCC 4.9, Qt (android_armv7)))
When executing step "Deploy to Android devicehey have you properly setup your Qt SDK, NDK and apache ant ?? . also if you compile your project the apk can also be found in build directory of your project .
something like this
/home/whatever_name/build-app-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_0_for_Android_armv7_c6c308-Release/android-build/bin/
-
I have set up everything including jdk,SDK and NDK. I have installed apache-ant by
sudo pacman -S apache-ant
Here is the screenshot:-
Also there is no android-build/bin folder in build directory :-
here is what I all have in build directory :-
% tree . ├── android-libcalqlatr.so-deployment-settings.json ├── libcalqlatr.so ├── main.o ├── Makefile ├── qrc_calqlatr.cpp ├── qrc_calqlatr.o ├── qrc_shared.cpp └── qrc_shared.o 0 directories, 8 files
Also I have setup all Android NDK environment variables.
% cat /etc/environment # # This file is parsed by pam_env module # # Syntax: simple "KEY=VAL" pairs on separate lines # JAVA_HOME=/usr/lib/jvm/default JRE_HOME=/usr/lib/jvm/default-runtime PATH=/home/jimbo/bin:/home/jimbo/.local/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/cordova/bin:/opt/AndroidSDK/tools/bin:/opt/AndroidNDK QT_QPA_PLATFORMTHEME=qt5ct RUSTUP_HOME=/opt/Rust CARGO_HOME=/opt/Rust/.cargo PKG_CONFIG_PATH=/bin/pkg-config ANDROID_HOME=/opt/AndroidSDK ANDROID_NDK=/opt/AndroidNDK ANDROID_NDK_ROOT=/opt/AndroidNDK ANDROID_NDK_HOME=/opt/AndroidNDK
-
@Blaster said in Can't run Qt app on physical mobile device:
Did you activate the USB Debug mode in the physical phone?
Yes.
Do you have the phone drivers installed?
No. Its runs perfectly with android studio .
I also had armv7a emulator image which works in android studio. In qt-Creator , it didn't event ask me to run app in emulator .
-
i am not sure what's the problem but here is my setup and it works perfectly fine . Maybe you can try this one out :)
-
using Qt5.10.0 ( offline installer)
-
i have created a qt_android folder : all the SDK and NDK and apache ant resides here.
-
my qt creator settings
..
-
also have you ran android sdk manager atleast once ?? to get the necessary tools .
-
try to build a sample example provided by Qt itself .
-
-
Hi, as I remember, I had same issue, see https://bugreports.qt.io/browse/QTCREATORBUG-20088 and I fixed that (see my link).