No longer able to compile QML application for Android
I am using Qt 5.8 and Qt Creator 4.2 and I am not able to run QML application on Android device on both windows 7 and Ubuntu 16.04.
I read on the internet that new Android API break a lot of things. Does Qt solve this problem yet?
I could not find the previous working version of Android SDK. So I am not to able compile. Do you have any suggestions?
Thanks in advance.
@Celal What does not work?
Qt Creator is not able to generate the .apk and installs on Android device.
Here is the my Qt Creator setting
Here is the output when I try to run QML application.
11:28:16: The process "/usr/bin/make" exited normally. 11:28:16: Starting: "/usr/bin/make" INSTALL_ROOT=/home/cs1323/workspace/build-untitled1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_8_0-Debug/android-build install install -m 755 -p libuntitled1.so /home/cs1323/workspace/build-untitled1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_8_0-Debug/android-build/libs/armeabi-v7a/libuntitled1.so 11:28:16: The process "/usr/bin/make" exited normally. 11:28:16: Starting: "/opt/Qt/5.8/android_armv7/bin/androiddeployqt" --input /home/cs1323/workspace/build-untitled1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_8_0-Debug/android-libuntitled1.so-deployment-settings.json --output /home/cs1323/workspace/build-untitled1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_8_0-Debug/android-build --deployment bundled --android-platform android-23 --jdk /usr/lib/jvm/java-8-openjdk-amd64 --ant ant Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl sh: 1: ant: not found Building the android package failed! -- For more information, run this command with --verbose. Generating Android Package Input file: /home/cs1323/workspace/build-untitled1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_8_0-Debug/android-libuntitled1.so-deployment-settings.json Output directory: /home/cs1323/workspace/build-untitled1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_8_0-Debug/android-build/ Application binary: /home/cs1323/workspace/build-untitled1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_8_0-Debug/libuntitled1.so Android build platform: android-23 Install to device: No 11:28:16: The process "/opt/Qt/5.8/android_armv7/bin/androiddeployqt" exited with code 14. Error while building/deploying project untitled1 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0)) When executing step "Build Android APK"
I also have a problem when creating a simulation device, it does not allow me to so. Here is the screen shot for that
In this dialog, I am not able to set Target API.
sh: 1: ant: not found
There's your problem. It's trying to use
antto build and can't find it on your system. Has nothing to do with Qt at all. Install ant using your distribution's package manager and you should be good to go.
I fixed the ant and still have the problem with creating the android packages. This is happening when I use Qt 5.8.
Anyway, the good news is I am able to compile and create android package with Qt 5.9, I am using grandle instead of ant and everything working great.
So, I am still not able to create a virtual device but I can deploy the application on my android device.
I will close this problem since I have no idea what is the problem.
Thank you so much for your time.
@Celal Glad you got it working. That is weird. It could be a 5.8 bug but I know others have deployed with 5.8 just fine.
Maybe something with your configuration. Either way it sounds like you figured it out so no worries. I hate not knowing why something broke though. :)
Thank you. I feel you, I hate it too. But you know I, know something wrong with 5.8 configurations. Because I have tried many different kinds of things so somehow I messed up the conf. Anyway, my plan is to try same things on fresh install Linux machine and see if I am still not able to compile with 5.8.
These days, I do not have time to do so. When I try it I will post here, hopefully, I will not forget.