I am developing an app using QT for android on Window Platform. And I encountered a problem when I clicked 'Build' button for the android project. The error message showed that "
Cannot run target compiler 'C:\Android\android-ndk-r16b-windows-x86_64\android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++'. Maybe you forgot to setup the environment?"
When I clicked 'Run' to the project, the error message showed that
"Cannot find the androiddeploy Json file.
Error while building/deploying project PhotoViewer (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.9.3 for Android armv7))
When executing step "Deploy to Android device"".
I checked the correctness of my compiler location and they are correct. I am not sure what I did wrong for the config setting.
Did you correctly installed and configured all prerequisites for Android QT development ?
regarding Cannot run target compiler 'C:\Android\android-ndk-r16b-windows-x86_64\android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++'
Check if Android NDK and the path in the error message does exist, QT is sure to work with ndk r10e.
if you are new to QT android development, you need to follow instructions here :
Installing the Prerequisites
Related
I am having issues on deploying my android application to my phone. This error will pop up whenever i try to release my application (Error: Cannot find the androiddeploy Json file.). And i have checked my all my development kits and it seem that Qt had approved its settings. Thanks.
Cannot find the androiddeploy Json file.
Error while building/deploying project swipe (kit: Android for armeabi-v7a (Clang Qt 5.9.8 for Android ARMv7))
When executing step "Deploy to Android device"
I do not know if it helps, but I faced the exact same problem and I solved it by just unchecking the "Shadow build" checkbox under "Build settings" (ctrl+5). After that, everything worked.
Target device: Lenovo tabM10 FHD plus
Qt version: 5.15.2
Qt Creator version: 4.14.2
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:-
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. :)
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.
I'm learning developing Android Application by Qt Creator (v4.1.0 Community). When I build my sample app, there's no issue but when I run it with Android x86 Kit (GCC 4.9, Qt 5.7.0), it's failed and I get this message from Compile Output Console (it still runs well when I run with Desktop Qt 5.7.0 MinGW 32 bit):
'C++' is not recognized as an internal or external command, operable
program or batch file.
'C++\Qt\build-AndroidAppSample-Android_for_x86_GCC_4_9_Qt_5_7_0-Debug\android-build\'
is not recognized as an internal or external command, operable program
or batch file. Error: Could not find or load main class
org.gradle.wrapper.GradleWrapperMain Building the android package
failed!
-- For more information, run this command with --verbose.
21:04:35: The process "C:\Qt\5.7\android_x86\bin\androiddeployqt.exe"
exited with code 14. Error while building/deploying project
AndroidAppSample (kit: Android for x86 (GCC 4.9, Qt 5.7.0)) When
executing step "Build Android APK"
Can anybody explain me what I do wrong or give some ideas to solve it. Thanks for any help.
Do you see your Android kit get detected automatically ? or was it added by you manually. I would suggest to try the thing I mentioned below and see if that helps.
On Projects, Build Android APK, change the Android build SDK to newer version as shown in the picture below:
I already have made a project with Qt and I wanted to build on Android.
It worked fine, but since I use another Workstation, I can't deploy my application.
I get the following log output :
17:50:53: Could not start process "mingw32-make" INSTALL_ROOT="D:\Projects\Qt\Comp\build-proj-Android_for_armeabi_v7a_GCC_4_7_Qt_5_4_1-Release\android-build" install
Error while building/deploying project Proj (kit: Android for armeabi-v7a (GCC 4.7, Qt 5.4.1))
When executing step "Copy application data"
I checked my kits. All seems good.
My SDK and NDK works well, everything seems to work with Xamarin for example.
Regards,
Had the same issue, solution was to add the mingw32-make to the PATH variable,
missed this originally as i had already added it as an override for the Make build step and thought that would be enough.
I'm trying to setup Qt Creator for Android C++ development that uses non-Qt libraries. Testing with a simple Hello World, I have a problem in deploying the compiled program to AVD through Qt Creator. The deployment process always stuck with an error message of;
Install to device: emulator-5554 No platform plugin, neither
libqtforandroid.so or libqtforandroidGL.so, included in package.
Please include one. 06:34:06: The process
"/home/dev/Qt5.3.0/5.3/android_armv7/bin/androiddeployqt" exited with
code 12. Error while building/deploying project helloworld (kit:
Android for armeabi-v7a (GCC 4.8, Qt 5.3.0)) When executing step
'Deploy to Android device'
How should I go about it?
Thanks.