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. Android: getting build errors (first time)
QtWS25 Last Chance

Android: getting build errors (first time)

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 3 Posters 396 Views
  • 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by mzimmers
    #1

    NOTE: I changed the title of this post because I was asking the wrong question.

    Hi all -

    Brand new to Android, both as a user and programmer...this ought to be interesting.

    I have just been given a Galaxy Tab A, and asked to download a Qt app to it. From my reading, it appears I first need to add something called a "System Image" to my Qt configuration. From what I can see, the correct System Image depends on the architecture of the processor in my tablet. My device has a Cortex-A53, which uses the Armv8-A architecture.

    So, do I correctly infer that I should select "Google APIs ARM 64 v8a" as my system image?

    sdk.PNG

    EDIT:

    After a bit more reading, now I'm not sure that I want a system image after all. So, let me ask this:

    How do I download my Qt application to my Android device?

    Thanks...

    J.HilkJ 1 Reply Last reply
    0
    • mzimmersM mzimmers

      NOTE: I changed the title of this post because I was asking the wrong question.

      Hi all -

      Brand new to Android, both as a user and programmer...this ought to be interesting.

      I have just been given a Galaxy Tab A, and asked to download a Qt app to it. From my reading, it appears I first need to add something called a "System Image" to my Qt configuration. From what I can see, the correct System Image depends on the architecture of the processor in my tablet. My device has a Cortex-A53, which uses the Armv8-A architecture.

      So, do I correctly infer that I should select "Google APIs ARM 64 v8a" as my system image?

      sdk.PNG

      EDIT:

      After a bit more reading, now I'm not sure that I want a system image after all. So, let me ask this:

      How do I download my Qt application to my Android device?

      Thanks...

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by J.Hilk
      #2

      @mzimmers said in Android: how to determine which System Image to use?:

      How do I download my Qt application to my Android device?

      make sure your sdk, jdk and ndk is set up correctly:
      19b403a3-d8f5-4051-9fbf-9526f8575544-image.png

      • enable development options on your android device. In those settings enable usb debugging
      • connect your device to your pc, in the popup that follows, allow file transfer
      • select the android kit in qt creator
      • hit build and run, a popup will appear with a list of all detected android devices, select your target
      • let the compile and deploy magic happen
      • enjoy

      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      mzimmersM 1 Reply Last reply
      1
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by
        #3

        google apis intel x86 atom_64 system image is for emulator which is better created in android studio.
        arm 64 v8a system image is for emulator as well, but on arm structure. I installed both.

        1 Reply Last reply
        1
        • J.HilkJ J.Hilk

          @mzimmers said in Android: how to determine which System Image to use?:

          How do I download my Qt application to my Android device?

          make sure your sdk, jdk and ndk is set up correctly:
          19b403a3-d8f5-4051-9fbf-9526f8575544-image.png

          • enable development options on your android device. In those settings enable usb debugging
          • connect your device to your pc, in the popup that follows, allow file transfer
          • select the android kit in qt creator
          • hit build and run, a popup will appear with a list of all detected android devices, select your target
          • let the compile and deploy magic happen
          • enjoy
          mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #4

          @J-Hilk thanks for the detailed steps! My setup didn't work quite the way you outlined -- I didn't get a popup of Android devices, but my device does appear in Creator (so I could select it in my kit). My build is giving me lots of unhelpful error messages:
          build.PNG
          While it isn't explicitly mentioned in the getting started page, one of the Android examples mentions the need to put paths to Perl and my C++ compiler into my PATH environment variable. I haven't done that yet; could this be contributing to these errors?

          Thanks...

          1 Reply Last reply
          0
          • mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #5

            Well, I managed to get it fixed. It needed two things:

            1. I had to comment out a subdirectory in this part of the CMakeLists.txt file:
            set_property(TARGET appaccelbubble APPEND PROPERTY
                  QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}#/android
            )
            
            1. I changed my NDK from 23.1.whatever to 25.1.whatever, based on an old thread here.

            I can see this development exercise is going to be an adventure -- sure are a lot of moving parts to Android development.

            Thanks to all who looked...

            1 Reply Last reply
            1

            • Login

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