Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Compiling Qt 5.1 Alpha for Android on Ubuntu 12.10 64-bit
Forum Updated to NodeBB v4.3 + New Features

Compiling Qt 5.1 Alpha for Android on Ubuntu 12.10 64-bit

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 7 Posters 9.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    atlemann
    wrote on 15 Apr 2013, 21:31 last edited by
    #1

    Hi!

    I have tried to create a QtCreator project for Android for some days now, using Qt 5.1 Alpha. I have tried to compile Qt with all kinds of parameters, but QtCreator keeps complaining that I have no valid kits available.

    I have set up:

    • Tools->Options->Android with paths to the android SDK and NDK (64bit linux version).
    • Tools->Options->Build&Run->Qt Versions with the /opt/Qt5.1/qtbase/bin/qmake

    I get a bunch of compilers "Android GCC (arm-4.7) (android-elf-32bit)" from the NDK.
    I get some kits with red exclamation marks saying it cannot find some /opt/ndk/prebuilt/linux-x86/bin/arm... stuff. I don't know why it is looking for x86 version when i downloaded the 64-bit version.

    Has anyone been able to create an Android project in QtCreator 2.7 using Ubuntu 12.10 64-bit?

    By the way..should Qt be build by root or by user?

    • Atle

    This is how I have tried to buid Qt 5.1 (script run with sudo):

    #!/bin/sh

    export ANDROID_SDK_ROOT=/usr/local/lib/android-sdk-linux
    export ANDROID_NDK_ROOT=/usr/local/lib/android-ndk-r8e
    export ANDROID_API_VERSION=android-17

    apt-get -y install build-essential perl python git "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libatspi2.0-dev libdbus-1-dev libicu-dev flex bison gperf libicu-dev libxslt-dev ruby

    ./configure -developer-build -opensource -xplatform android-g++ -android-ndk /usr/local/lib/android-ndk-r8e -android-sdk /usr/local/lib/android-sdk-linux -nomake tests -nomake examples -no-gtkstyle -confirm-license

    make -j5

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on 16 Apr 2013, 08:17 last edited by
      #2

      I can't answer your main question, but as a rule of thumb you should always build as a non-root user. You may need to run make install as root (if the install location requires that), but never the build itself.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        atlemann
        wrote on 16 Apr 2013, 16:37 last edited by
        #3

        Tried building as normal user to /home/.../lib, but I still get no valid kits. It auto-detects 9 toolchains from the NDK, which are listed under Compilers. However, the auto-detected kits are looking in the prebuilt/linux-x86/bin directory for an arm gdb debugger. The NDK is the 64 bit one from google, which contains prebuilt/linux-x86_64/bin folder, no x86 32-bit folder. How do I get a valid kit for a "Mobile Qt Application"? Is there another project type I am supposed to use?

        • Atle
        1 Reply Last reply
        0
        • A Offline
          A Offline
          atlemann
          wrote on 16 Apr 2013, 20:52 last edited by
          #4

          Which project type should I use for Android/iOS project using Qt5.1 alpha? I have tried both Qt Quick 1 and Qt Quick 2, since “Mobile Qt Application” did not find the available kits useful. However, both Quick types give an error when trying to build:

          1. Project ERROR: Unknown module(s) in QT: declarative
          2. Project ERROR: Unknown module(s) in QT: qml quick

          In the code editor, it also says QApplication: No such file or directory...

          How do I fix this?

          • Atle
          1 Reply Last reply
          0
          • V Offline
            V Offline
            vlastimirs
            wrote on 12 May 2013, 14:46 last edited by
            #5

            Bumping this one up. have a similar issue, with 5.1.0a and 2.7.1.

            no suitable kits found, but there are several listed in the options.

            @Atlemann: Any success yet?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              atlemann
              wrote on 16 May 2013, 13:22 last edited by
              #6

              No success. I tried making a Qt Quick project instead, but then the QtCreator complained that it could not find any of the Q... include files. I'm just going to wait for a beta or final release.

              By the way, if I ever get this to work, can make a QtQuick2 project for an app for both Android and iOS or do I have to stick to QtQuick1?

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JKSH
                Moderators
                wrote on 16 May 2013, 15:40 last edited by
                #7

                Looks like there's not many people with the relevant knowledge in this forum...

                Try posting your question on the mailing list: http://lists.qt-project.org/mailman/listinfo/interest

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  muzicar
                  wrote on 26 May 2013, 16:33 last edited by
                  #8

                  Greets all.

                  I'm having the same problem only with the 32-bit version of the newest QT5.1 beta1. Installed ant, java, sdk, ndk after that QT5.1 beta, added android kits in the options (successfully) also added one AVD which starts perfect.

                  But if I want to create a new QT mobile application for Android it just doesn't show none of the kits that are infact properly installed (no errors anywhere).

                  Everything else works fine and I have created three seperate qt gui apps without any problems.

                  Has anyone got any knowledge on this or has the OP found any solutions to this?

                  Kind regards.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    AlterX
                    wrote on 20 Jun 2013, 17:53 last edited by
                    #9

                    Same problem on both win8 and linux gentoo (both 64bit) with Qt 5.1 rc

                    Qt Ambassador
                    Real-time cooperative teams: http://www.softairrealfight.net
                    Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                    https://codereview.qt-project.org/...

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      didac.perez
                      wrote on 1 Jul 2013, 08:48 last edited by
                      #10

                      Same problem here... I have tried everything!

                      Did you finally succeed?

                      Cheers,

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        AlterX
                        wrote on 1 Jul 2013, 10:00 last edited by
                        #11

                        Yes,
                        just use QtQuick2 project, the android version will be removed on the next release

                        Qt Ambassador
                        Real-time cooperative teams: http://www.softairrealfight.net
                        Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                        https://codereview.qt-project.org/...

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved