user9392253
user9392253

Reputation:

Can't run android app in QtCreator

I am trying to run Android app in Qt-Creator .when i try to build it , it builds without any problems but when I hit run button , instead of asking where to run app it gives me this error :-

Cannot find the android build step.
Error while building/deploying project untitled (kit: Android for armeabi-v7a (GCC 4.9, Qt  (android_armv7)))
When executing step "Deploy to Android device"

I am using Arch Linux . I had install Android SDK and NDK and OracleJDK 10. I had connected my Karbon Titanium phone via USB to my laptop and enabled the USB DEBUGGING .

EDIT:-

Here are 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

RUSTUP_HOME=/opt/Rust
CARGO_HOME=/opt/Rust/.cargo
ANDROID_HOME=/opt/AndroidSDK
ANDROID_NDK_HOME=/opt/AndroidNDK
PKG_CONFIG_PATH=/bin/pkg-config

Also I am using NDK 10e:-

enter image description here

Upvotes: 0

Views: 1424

Answers (2)

Accellular Automata
Accellular Automata

Reputation: 21

It works for me.

Just delete Qt creator settings files and restart it:

Where does QtCreator save its settings?

On Windows 10, 8, Vista and 7, the files are located in :\Users\\AppData\Roaming\QtProject and :\Users\\AppData\Local\QtProject.

On Windows XP, the files are located in :\Documents and Settings\\Application Data\QtProject and :\Documents and Settings\\Local Settings\Application Data\QtProject.

https://bugreports.qt.io/browse/QTCREATORBUG-20088

A problem was solved when I re-created the QtC settings from scratch.

So, something wrong in QtC code, related to the settings update, because, as can see from my screenshoots, the QtC reported that all Android configuration is OK, but the build step was not created.

Upvotes: 0

nisarg parekh
nisarg parekh

Reputation: 437

you have to use Qt version 5.9.0 with sdk 26.1.1 and ndk version 10.4.0. earlier version than 5.9.0 of qt will not work with sdk 26.1.1. so you just need to update your Qt version to 5.9.0.

At Last, Use This Combination:

Jdk version : 1.8.0
SDK version : 26.1.1
NDK version : 10.4.0
Qt version : 5.9.0

it works for me. hope it will work for you. :)

Upvotes: 1

Related Questions