Ubuntu 16.04 - Qt 5.10 - Android 7.1
-
Dear All,
I am quiet new to QT and I tried to set up the environment for Android Apps.
Followed the Instructions, SDK and NDK seems to be detected, but the QT versions are missing.
The versions 5.10 and 5.9.2 are installed:
I also found on the QT Site that for Android developement only MacOS 10.12 and Red Hat Hosts are recommended? This means there is no way for other distros like ubuntu?
There is also an Article about how to Build QT5 for Android (http://wiki.qt.io/Android) but I cant figure out the right parameters for the configuration.
If someone could give me a pointer on what to read about this or how to get it work i would be very happy.
Thanks in advance,
b -
Hi,
The missing mips is normal.
What exact problem do you have ?
-
Thank you for the prompt reply :)
I think that I should be able to select Android as a build target when configuring an example project - but there i get this message:
I "expected" that after the configuration I can start the qt app in a virtual machine (test or test2) or on my android phone connected in debugging mode.
Please also consider that it is also possible that im missing something very trivial from the big picture - programming c++ and qt are very new to me.
-
Silly question but are you using the Qt Creator coming from your Qt installation or the one from your Linux distribution ?
-
One additional question:
What do you get when you hover the mouse cursor over the danger signs in your Qt Versions panel ?
-
Hello,
ubuntu:
I installed the Creator with the qt online installer. Also tried the 4.5.0RC1 Version - both act the same way.
I dont get a hover Text in QT Versions,it only shows (when clicked):
macOS:
I tried it also under macOS 10.13.2, Installed Xcode, Android Studio, Java and NDK, the QT Versions get autodetected this time, but the SDK Platform is not found:
And the built in Download Tool seem to have a problem with licenses which I cant agree (there is no prompt for y/n ).
The SDK Platforms are installed:
I would be really happy if it would work on one of the hosts. (ubuntu would be the first choice).
Thank you for trying to help me!
-
Did you check with the Android SDK Manager ?
-
A happy new year :)
The command:
~/Android/Sdk/tools/bin$ ./sdkmanager --list | sed -e '/Available Packages/q'
Returns in Ubuntu:
Installed packages:=====================] 100% Computing updates...Path Version Description Location build-tools;27.0.3 27.0.3 Android SDK Build-Tools 27.0.3 build-tools/27.0.3/ cmake;3.6.4111459 3.6.4111459 CMake 3.6.4111459 cmake/3.6.4111459/ emulator 27.0.2 Android Emulator emulator/ extras;android;m2repository 47.0.0 Android Support Repository extras/android/m2repository/ extras;google;m2repository 58 Google Repository extras/google/m2repository/ extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2 1 Solver for ConstraintLayout 1.0.2 extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.2/ extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2 1 ConstraintLayout for Android 1.0.2 extras/m2repository/com/android/support/constraint/constraint-layout/1.0.2/ lldb;3.0 3.0.4213617 LLDB 3.0 lldb/3.0/ ndk-bundle 16.1.4479499 NDK ndk-bundle/ patcher;v4 1 SDK Patch Applier v4 patcher/v4/ platform-tools 27.0.1 Android SDK Platform-Tools platform-tools/ platforms;android-25 3 Android SDK Platform 25 platforms/android-25/ platforms;android-27 1 Android SDK Platform 27 platforms/android-27/ sources;android-25 1 Sources for Android 25 sources/android-25/ sources;android-27 1 Sources for Android 27 sources/android-27/ system-images;android-25;google_apis;armeabi-v7a 11 Google APIs ARM EABI v7a System Image system-images/android-25/google_apis/armeabi-v7a/ system-images;android-25;google_apis;x86_64 11 Google APIs Intel x86 Atom_64 System Image system-images/android-25/google_apis/x86_64/ system-images;android-27;google_apis;x86 2 Google APIs Intel x86 Atom System Image system-images/android-27/google_apis/x86/ system-images;android-27;google_apis_playstore;x86 2 Google Play Intel x86 Atom System Image system-images/android-27/google_apis_playstore/x86/ tools 26.1.1 Android SDK Tools tools/ I dont know how to check if the compilers are in place?
On macOS your hint helped a lot. I tested the command line sdkmanager and it gave this error message:
"Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema"
The problem was JDK 9 version, i removed it:
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPanealso deleted the JDK9 folder here:
and installed JDK8 (8u152)
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htmlAfter that the "QT included SDK Manager" was working and I could accept the licenses. I could succesfully deploy the analog clock example to my android phone. :)
For anyone reads this later: It does not matter if the Android Studio Included SDK Manager GUI is working fine - check the command line tool.
On ubuntu should I try to remove android studio and all qt packages and perform a complete reinstall?
Thank you very much for your help @SGaist !
-
Glad you found out and thanks for sharing !
Happy coding !
-
The problem is solved also for ubuntu.
The QT Versions for Android were shown as missing in QT Creator:
The android-ndk-r10e was causing the problem (This is the recommended version for QT).
I installed the latest NDK from the Android SDK Manager as a Package:
/usr/local/android-studio/bin$ ./studio.sh
Configure > SDK Manager > SDK Tools
set the path to it in QT:
Apply and the Compilers were Auto-detected: