Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error build project on linux for android.
Forum Updated to NodeBB v4.3 + New Features

Error build project on linux for android.

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 943 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.
  • T Offline
    T Offline
    TheGringerEye
    wrote on last edited by TheGringerEye
    #1

    Means used:
    Ubuntu 20.04
    Qt 5.12.11 android arm64-v8a
    NDK 21.3.6528147
    Error:
    /home/dev/android/ndk/21.3.6528147/sources/cxx-stl/llvm-libc++/include/cmath:319: error: no member named 'isfinite' in the global namespace
    In file included from main.cpp:1:
    /home/dev/android/ndk/21.3.6528147/sources/cxx-stl/llvm-libc++/include/cmath:319:9: error: no member named 'isfinite' in the global namespace
    using ::isfinite;
    ~ ~^
    and other cmath print functions fail.
    There are also typeinfo errors:
    /home/dev/android/ndk/21.3.6528147/sources/cxx-stl/llvm-libc++/include/typeinfo:215: error: cast from pointer to smaller type 'std::__type_info_implementations::__non_unique_arm_rtti_bit_impl::__type_name_t' (aka 'unsigned int') loses information
    In file included from test.cpp:1:
    In file included from /home/dev/android/ndk/21.3.6528147/sources/cxx-stl/llvm-libc++/include/memory:653:
    /home/dev/android/ndk/21.3.6528147/sources/cxx-stl/llvm-libc++/include/typeinfo:215:14: error: cast from pointer to smaller type 'std::__type_info_implementations::__non_unique_arm_rtti_bit_impl::__type_name_t' (aka 'unsigned int') loses information
    return reinterpret_cast<__type_name_t>(__v);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    How to fix it?

    I try to learn English.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Your NDK is too new: https://doc.qt.io/qt-5.14/android-getting-started.html, you need to downgrade to 19.x. Or upgrade Qt to 5.15.x.

      (Z(:^

      T 2 Replies Last reply
      2
      • sierdzioS sierdzio

        Your NDK is too new: https://doc.qt.io/qt-5.14/android-getting-started.html, you need to downgrade to 19.x. Or upgrade Qt to 5.15.x.

        T Offline
        T Offline
        TheGringerEye
        wrote on last edited by
        #3

        @sierdzio But Qt Creator itself installed this version of the NDK. Why did he do this?

        I try to learn English.

        1 Reply Last reply
        0
        • sierdzioS sierdzio

          Your NDK is too new: https://doc.qt.io/qt-5.14/android-getting-started.html, you need to downgrade to 19.x. Or upgrade Qt to 5.15.x.

          T Offline
          T Offline
          TheGringerEye
          wrote on last edited by
          #4

          @sierdzio I Installed NDK 21 but QtCreator has error
          644aec54-7798-4547-97d9-55dc430529be-image.png

          I try to learn English.

          KroMignonK 1 Reply Last reply
          0
          • T TheGringerEye

            @sierdzio I Installed NDK 21 but QtCreator has error
            644aec54-7798-4547-97d9-55dc430529be-image.png

            KroMignonK Offline
            KroMignonK Offline
            KroMignon
            wrote on last edited by
            #5

            @TheGringerEye said in Error build project on linux for android.:

            I Installed NDK 21 but QtCreator has error

            You have to install android command line tools.
            You can do it at command line:

            cd <ANDROID_SDK_ROOT>/tools/bin/
            ./sdkmanager --sdk_root=<ANDROID_SDK_ROOT> --install "cmdline-tools;latest"
            

            Or with QtCreator, on same Dialog at bottom, select:

            • SDK Manager
            • Show all Packages
            • select in Tools following packages:
              • Android SDK Command-line Tools (latest)
            • click on "apply"

            e386618e-5c62-4a67-bae8-0f14654a212e-image.png

            It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

            T 1 Reply Last reply
            2
            • KroMignonK KroMignon

              @TheGringerEye said in Error build project on linux for android.:

              I Installed NDK 21 but QtCreator has error

              You have to install android command line tools.
              You can do it at command line:

              cd <ANDROID_SDK_ROOT>/tools/bin/
              ./sdkmanager --sdk_root=<ANDROID_SDK_ROOT> --install "cmdline-tools;latest"
              

              Or with QtCreator, on same Dialog at bottom, select:

              • SDK Manager
              • Show all Packages
              • select in Tools following packages:
                • Android SDK Command-line Tools (latest)
              • click on "apply"

              e386618e-5c62-4a67-bae8-0f14654a212e-image.png

              T Offline
              T Offline
              TheGringerEye
              wrote on last edited by
              #6

              @KroMignon I installed all avalibles NDK ver 21, errors in Qt Creator was resolved. But build errors didn't go away( 9abefa65-be92-412e-b37e-4422ef687be6-image.png

              I try to learn English.

              KroMignonK 1 Reply Last reply
              0
              • T TheGringerEye

                @KroMignon I installed all avalibles NDK ver 21, errors in Qt Creator was resolved. But build errors didn't go away( 9abefa65-be92-412e-b37e-4422ef687be6-image.png

                KroMignonK Offline
                KroMignonK Offline
                KroMignon
                wrote on last edited by
                #7

                @TheGringerEye said in Error build project on linux for android.:

                But build errors didn't go away(

                Which build error do you have?

                It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                T 1 Reply Last reply
                0
                • KroMignonK KroMignon

                  @TheGringerEye said in Error build project on linux for android.:

                  But build errors didn't go away(

                  Which build error do you have?

                  T Offline
                  T Offline
                  TheGringerEye
                  wrote on last edited by
                  #8

                  @KroMignon a0091e07-55bf-4803-9bd1-30998c0cdb4c-image.png

                  I try to learn English.

                  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