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.
    0_1514637999302_7c6f97b6-993b-4a9f-9cf1-062fa46d3478-image.png
    0_1514638721342_33b165b9-eecd-447a-b0e0-9aa8cc972ea7-image.png

    The versions 5.10 and 5.9.2 are installed:
    0_1514638627631_c9315d10-037d-47c3-9978-2b894273b690-image.png

    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


  • Lifetime Qt Champion

    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:
    0_1514639303625_82162058-40ea-468c-b953-1bafe5fbc8e4-image.png

    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.


  • Lifetime Qt Champion

    Silly question but are you using the Qt Creator coming from your Qt installation or the one from your Linux distribution ?


  • Lifetime Qt Champion

    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):
    0_1514732688730_69e02b4d-1dcc-4f01-99dd-b92f1abce4f7-image.png

    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:
    0_1514733195357_13dc5337-dc40-41ef-89af-02cda48a180f-image.png
    And the built in Download Tool seem to have a problem with licenses which I cant agree (there is no prompt for y/n ).
    0_1514733371618_472ce1cd-d762-4d7b-ab63-a7705d957d39-image.png
    0_1514733380896_94e7f3aa-5dc0-4b2b-90ef-e91932050947-image.png
    0_1514733386652_4a76661e-b5dd-45ff-9b6f-21e1d49d485e-image.png

    The SDK Platforms are installed:
    0_1514733408167_d306199a-d892-4e04-b3f4-da0bd4ee887c-image.png

    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!


  • Lifetime Qt Champion

    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"
    0_1514804466003_6c03ce73-ffec-4cb7-958b-cf301847b13c-image.png

    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.prefPane

    also deleted the JDK9 folder here:
    0_1514804647045_41bd3b6f-3b85-40c8-afbd-370c5eca11ef-image.png

    and installed JDK8 (8u152)
    http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

    After 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 !


  • Lifetime Qt Champion

    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:
    0_1514970161420_c15b8b9f-bb66-496b-8280-f07acc9d4f3b-image.png

    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
    0_1514970458849_b6d9a386-88ce-452e-94c2-b4e3516de8c7-image.png
    set the path to it in QT:
    0_1514970651324_75592e63-eb64-4257-9f6d-c286d16bbd4b-image.png
    Apply and the Compilers were Auto-detected:
    0_1514970592269_df59cfd9-5169-421a-9ffd-be01e56a2426-image.png


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.