Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Building for Android
Forum Updated to NodeBB v4.3 + New Features

Building for Android

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 418 Views 2 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.
  • P Offline
    P Offline
    Padlock
    wrote on last edited by
    #1

    For some time now I've been unsuccessfully trying to build for Android. One of the Android Studio or SDK updates must have caused it as I haven't changed anything.

    Qt 5.11.3
    Qt Creator 4.12

    aa47dad6-d981-4ae7-9d3a-1b1d8987b83d-image.png

    I can't run qmake.

    This is the error I'm getting:
    <path>/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++' is not recognized as an internal or external command, operable program or batch file.

    This makes sense because the file doesn't exist. The Android kit uses clang.

    0dc21e16-86e1-4f82-81f9-e77a092c54c5-image.png

    Where would I tell Qt Creator to work with the kit's compiler?
    Or, how and from where would I get an arm-linux-androideabi-g++.exe file that would successfully build?

    Any help or just considerations are appreciated.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      From the top of my head, your NDK is too recent for the version of Qt you are using. Either use a version more recent of Qt or downgrade the NDK to r107.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P Offline
        P Offline
        Padlock
        wrote on last edited by
        #3

        Thanks a lot. I renamed the folder ndk-bundle and copied NDK r10e in, then renamed that to ndk-bundle.

        I don't know how and why this has changed/updated to a different NDK version. This had always been r10e before. That's what https://doc.qt.io/qt-5/android-getting-started.html suggests, and that's what I think I used for the setup.

        Now I got the next issue when the build process tries to package (AndroidManifest.xml:27:1-108: AAPT: error: resource array/bundled_in_lib (aka ...:array/bundled_in_lib) not found.

        Since this is a different issue I'd say the original issue can be closed as solved. Thanks again!

        1 Reply Last reply
        0
        • P Offline
          P Offline
          Padlock
          wrote on last edited by
          #4

          Yes, I just went to Tools -> Options -> Devices, then Android tab. Qt Creator claims that necessary packages are missing. I most likely followed this advice in the past and broke my installation with it.

          56e89bd7-3b64-45c0-b673-f1175e2605cf-image.png

          This looks like a bug in Qt Creator, although it's actually only wrong for Qt versions below 5.12.6 (according to https://doc.qt.io/qt-5/android-getting-started.html).

          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