problem setting up Android SDK through Qt 5.6 Creator



  • I am venturing to try my first helloworld app in Android.
    But I can't get past the first steps.

    I have installed Qt 5.6.0, Android SDK (and for good measure Android Studio) on Ubuntu 14.04.
    I open Qt 5.6 Creator and navigate to Options > Android.
    I set paths to Android Sdk and Ndk (which are accepted as valid paths).

    However ... I see this error message ...

    Warning information ! in orange triangle.
    Qt versions for 5 architectures are missing
    To add the Qt versions, select Options > Build & Run > Qt Versions

    But in Build & Run > Qt Versions I have only one entry

    Manual:
    Qt 5.6.0 (qt56) /opt/qt56/bin/qmake

    So what does "Qt versions for 5 architectures" refer to.?

    Notes:
    Qt 5.6.0 was installed through PPA, not through Qt downloads, since Qt does not provide a build for 32bit Linux.

    I believe that I installed Android SDK from and earlier Qt.io installer. But I have since updated the SDK through Android/Sdk/tools/android.

    If I separately launch Android Studio this accepts the same path to Android SDK as set in Qt Creator. And I can navigate to Android Studio > Tools > Android SDK Manager.
    The first error I note in Ubuntu Studio is on running app I get ...
    Error running app: Unable to obtain debug bridge

    But my first problem to crack is the Qt Creator setup message above. I'll look at ADB later.


  • Lifetime Qt Champion

    Hi,

    Android can be build for several architecture (ARM, ARM64, x86, MIPS, etc.) That's what's it referring to.

    From what you wrote, you don't have Qt for Android installed. You can either build it yourself. Or use e.g. the 5.5.1 Linux/Android installer available here



  • @SGaist

    I see that now.
    Progress made so far.

    Downloaded ...
    qt-opensource-linux-x86-android-5.5.1

    from here ...

    http://download.qt.io/official_releases/qt/5.5/5.5.1/qt-opensource-linux-x86-android-5.5.1.run

    http://download.qt.io/official_releases/qt/5.5/5.5.1/

    Since I already have Qt 5.6.0 installed (but without Android support) I looked here ...

    http://download.qt.io/official_releases/qt/5.6/5.6.0/

    but there is no qt-opensource-linux-x86-android-5.6.0.run

    due to known issue that Linux 32 prebuilt binaries are not in Qt downloads.

    I was hoping for an "Android only" pre-built installer to work with installed Qt 5.6.0.

    So I proceeded to install Qt 5.5.1 as my second Qt installation.

    I ran the downloaded installer .. Qt 5.5.1 Setup

    I ticked all Android options under Qt 5.5

    installed in /opt/Qt5.5.1 1.27 Gb installation

    Watched Android being installed here ...
    /opt/Qt5.5.1/5.5/android

    These architectures are installed ...

    /opt/Qt5.5.1/5.5/android_armv5/
    /opt/Qt5.5.1/5.5/android_armv7/
    /opt/Qt5.5.1/5.5/android_x86/
    /opt/Qt5.5.1/5.5/gcc/

    Now launching Qt Creator > Tools > Options > Android

    Android Sdk location is valid
    Android Ndk location is valid

    Found 8 toolchains for this Ndk

    However .. same warning message as reported earlier ...

    Qt versions for 3 architectures are missing.
    to add the Qt versions, select Options > Build & Run > Qt Versions

    So I looked at

    Build & Run ...

    Kits
    Auto-detected
    Android for armeabi (GCC 4.9, Qt 5.5.1)
    Android for armeabi-v7a (GCC 4.9, Qt 5.5.1)
    Android for x86 (GCC 4.9, Qt 5.5.1)
    Desktop Qt 5.5.1 GCC 32 bit

    Qt Versions
    Auto-detected
    Qt 5.5.1 for Android armv7 /opt/Qt5.5.1/5.5/android_armv7/bin/qmake
    Qt 5.5.1 for Android armv5 /opt/Qt5.5.1/5.5/android_armv5/bin/qmake
    Qt 5.5.1 for Android x86 /opt/Qt5.5.1/5.5/android_x86/bin/qmake
    Qt 5.5.1 GCC 32bit /opt/Qt5.5.1/5.5/gcc/bin/qmake

    Compilers
    Auto-detected
    GCC (x86 32bit in /usr/bin) GCC
    Android GCC (i686-4.8) Android GCC
    Android GCC (i686-4.9) Android GCC
    Android GCC (mipsel-4.8) Android GCC
    Android GCC (mipsel-4.9) Android GCC
    Android GCC (arm-4.9) Android GCC
    Android GCC (arm-4.8) Android GCC
    Android GCC (aarch64-4.9) Android GCC
    Android GCC (x86_64-4.9) Android GCC

    Questions:

    • What next to locate these elusive "3 missing architectures"?

    • And I'm guessing that I can't just copy the Qt 5.5.1 android libraries into Qt 5.6.0?
      How can I update Qt 5.6.0 to include Android?

    Thanks.


  • Lifetime Qt Champion

    You don't need them, that's just a warning. Unless you plan to develop for a MIPS device, there's really no need to worry about these compilers.

    What do you mean by copy into 5.6.0 ? There's nothing to copy, these are two different builds.

    You can try the online installer for 32bit Linux. With this one, you can more easily update your setup.



  • @SGaist said:

    You can try the online installer for 32bit Linux. With this one, you can more easily update your setup.

    The only online installer I see is here

    • Qt Online Installer for Linux 32-bit (31 MB)    (info)
    at

    http://www.qt.io/download-open-source/#section-2

    and on running this it does not include Qt 5.6.0 in the list of installations .. only 5.5.

    So the bottom line is that with my Linux 32 I cannot install Android on Qt 5.6.0 .. unless I build from scratch (which I don't want to do).

    ...

    Other tutorials I've read also say .. ignore the warning message in Qt Creator.

    e.g. ...

    http://pharaoh-sharing.blogspot.co.uk/2015/04/qt-with-android.html

    http://www.unixmen.com/install-android-sdk-ubuntu-14-04/

    I'll press on, ignoring the warnings.

    One slight issue. I've found that both versions of Qt Creator now installed seem to share the same ~/.config/QtProject location. So when switching between Qt versions of Qt Creator I see 5.6.0 appearing alongside 5.5.1 in Options.

    But I just have to delete the unwanted references for each session.

    Should there not be a separate ~/.config/QtProject for each version?.


  • Lifetime Qt Champion

    AFAIK, no.

    Unless you uninstalled Qt 5.6 there's nothing wrong there. Older version of Qt Creator can handle Qt 5.6.


Log in to reply
 

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