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. Qt 5.12 (Beta) + Android (Clang) = App Crash
Forum Updated to NodeBB v4.3 + New Features

Qt 5.12 (Beta) + Android (Clang) = App Crash

Scheduled Pinned Locked Moved Solved Mobile and Embedded
11 Posts 5 Posters 3.7k Views 3 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.
  • R Ray Gray

    I'm really glad that Qt 5.12 will (finally) supports Clang toolchain for Android targets. Trying current beta version, compilation on my Windows 10 machine goes smoothly as silk, however deployed apps ingloriously crash with the following error.

    E AndroidRuntime: FATAL EXCEPTION: qtMainLoopThread
    E AndroidRuntime: Process: org.qtproject.example.mousearea, PID: 25359
    E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address"
    

    Same result with different configurations:

    • SDK version: 26.1.1 (latest)
    • NDKs: 10e,15c, 16b, 17c
    • android APIs: 22, 23, 27, 28
    • different target devices (phones)

    Any ideas?

    K Offline
    K Offline
    koahnig
    wrote on last edited by
    #2

    @Ray-Gray

    In here ist says
    Note: If your Qt version is earlier than v5.9, use the SDK tools package v25.2.5 or earlier.

    Not sure if ot makes sense to have the most recent sdk version even if it does not explicit say so.

    Vote the answer(s) that helped you to solve your issue(s)

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Ray Gray
      wrote on last edited by
      #3

      @koahnig

      If I understand correctly, my Qt is > 5.9, therefore SDK tools > 25.2.5 should be fine .

      Pablo J. RoginaP 1 Reply Last reply
      0
      • R Ray Gray

        @koahnig

        If I understand correctly, my Qt is > 5.9, therefore SDK tools > 25.2.5 should be fine .

        Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #4

        @Ray-Gray you may consider Qt in [5.9 ... 5.12] a grey zone where clang is not well supported see this post for instance

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        1
        • R Offline
          R Offline
          Ray Gray
          wrote on last edited by
          #5

          @Pablo-J-Rogina

          According to QTBUG-67464 and Markus' comment here, clang should be now fully supported.

          K 1 Reply Last reply
          0
          • R Ray Gray

            @Pablo-J-Rogina

            According to QTBUG-67464 and Markus' comment here, clang should be now fully supported.

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #6

            @Ray-Gray

            Did you check already on google's qt on android group?

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Ray Gray
              wrote on last edited by
              #7

              @koahnig

              Checked there, but the group seems quite inactive...

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Ray Gray
                wrote on last edited by
                #8

                I finally managed to fix the problem. App doesn't crash when compiled with NDK16b!

                • install Android Studio (if not already installed)
                • download NDK16b and extract it to any location (in my case 'D:\sdk\android-ndk-r16b')
                • start Qt Creator
                • select menu Tools > Options > Devices, tab Android
                • set proper android SDK paths:
                  Capture1.png
                • click OK
                • open your project (.pro)
                • Important! Delete folder containing previous (shadow) build (see path under 'Build directory'):
                  Capture2.png
                • under Projects (left bar) > Build & Run, activate Android configuration
                • compile & run
                K 1 Reply Last reply
                2
                • R Ray Gray

                  I finally managed to fix the problem. App doesn't crash when compiled with NDK16b!

                  • install Android Studio (if not already installed)
                  • download NDK16b and extract it to any location (in my case 'D:\sdk\android-ndk-r16b')
                  • start Qt Creator
                  • select menu Tools > Options > Devices, tab Android
                  • set proper android SDK paths:
                    Capture1.png
                  • click OK
                  • open your project (.pro)
                  • Important! Delete folder containing previous (shadow) build (see path under 'Build directory'):
                    Capture2.png
                  • under Projects (left bar) > Build & Run, activate Android configuration
                  • compile & run
                  K Offline
                  K Offline
                  koahnig
                  wrote on last edited by
                  #9

                  @Ray-Gray

                  Great! Thanks for your feedback

                  Vote the answer(s) that helped you to solve your issue(s)

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    matain
                    wrote on last edited by
                    #10

                    hello,
                    I've got the similar problem when changing the Qt from 5.11.1 to 5.12.0
                    It seems like crashed when the Android App start openning.
                    After some tracing, I finally found that, the reason is, the App hasn't got the permissions of reading&writing local extra storage. After I add the according permissions mannualy (in system management) , the App runs OK.
                    The 'permission' also can be added by this way below:
                    http://amin-ahmadi.com/2015/11/29/how-to-add-permissions-to-your-qt-android-app/

                    1 Reply Last reply
                    0
                    • DabullaD Offline
                      DabullaD Offline
                      Dabulla
                      wrote on last edited by Dabulla
                      #11
                      This post is deleted!
                      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