0

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

  • Do you have emulator or connected device ?? – Mohammad Kanan May 20 '18 at 12:24
  • What version of NDK and SDK are you using? – eyllanesc May 20 '18 at 13:31
  • @eyllanesc SDK version = 26.1.1 and NDK version = r17-linux-x86_64 –  May 20 '18 at 13:58
  • @MohammadKanan I have my android phone connected –  May 20 '18 at 13:59
  • @noone The problem is in the NDK, I'm also an archilinux user and the problem is that the NDK version is not supported by Qt, according to the docs: http://doc.qt.io/qt-5/androidgs.html informs that it supports the version 10e version, if you have installed aur you can install aur/android-ndk-10e – eyllanesc May 20 '18 at 14:01
  • Or download it from https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip – eyllanesc May 20 '18 at 14:07
  • @eyllanesc Sory for late reply ,But still after downloading 1GB old NDK , I am getting the same warning. –  May 20 '18 at 16:27
  • have you changed the route of the NDK in Qt? I recommend downloading it from aur, this will place that NDK in the Path by default, most likely the script compiling Qt is pointing to the other NDK. – eyllanesc May 20 '18 at 16:31
  • @eyllanesc pls see my edit. Also , do I have to set PATH variable for NDK ? if yes , then where ? there are just too many bin folders . –  May 20 '18 at 16:55
  • @noone I think the easiest thing is to install it from aur: `yaourt -S aur/android-ndk-10e` and then `yaourt -S android-qt5-armeabi-v7a` – eyllanesc May 20 '18 at 18:40

2 Answers2

1

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. :)

Lucifer
  • 1,594
  • 2
  • 18
  • 32
nisarg parekh
  • 413
  • 4
  • 23
0

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.

Accellular
  • 11
  • 2