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. Running on android
Forum Updated to NodeBB v4.3 + New Features

Running on android

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 4 Posters 1.3k 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.
  • A Offline
    A Offline
    Abdulmueez
    wrote on last edited by VRonin
    #1

    I have been trying to run qt on my androd phone, but been running into a lot of problems, I have downloaded the prerequisites as instructed but this does not seem to solve anything. I started trying to run examples instead incase the fault was from my own code, but the following is what appears in my general message tab:

    Maybe you forgot to setup the environment?
    Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
    Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
    Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
    Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
    Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
    Project ERROR: Cannot run compiler 'cl'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\tetrix\tetrix.pro. Giving up.
    Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\tetrix\tetrix.pro. Giving up.
    Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\tetrix\tetrix.pro. Giving up.
    

    Can someone put me through please?

    jsulmJ 1 Reply Last reply
    0
    • A Abdulmueez

      I have been trying to run qt on my androd phone, but been running into a lot of problems, I have downloaded the prerequisites as instructed but this does not seem to solve anything. I started trying to run examples instead incase the fault was from my own code, but the following is what appears in my general message tab:

      Maybe you forgot to setup the environment?
      Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
      Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
      ===================
      ===================
      Maybe you forgot to setup the environment?
      Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
      Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
      ===================
      ===================
      Maybe you forgot to setup the environment?
      Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
      Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
      ===================
      ===================
      Maybe you forgot to setup the environment?
      Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
      Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
      ===================
      ===================
      Maybe you forgot to setup the environment?
      Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\analogclock\analogclock.pro. Giving up.
      Project ERROR: Cannot run compiler 'cl'. Output:
      ===================
      ===================
      Maybe you forgot to setup the environment?
      Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\tetrix\tetrix.pro. Giving up.
      Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
      ===================
      ===================
      Maybe you forgot to setup the environment?
      Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\tetrix\tetrix.pro. Giving up.
      Project ERROR: Cannot run target compiler 'C:\Users\emiol\OneDrive\Desktop\C++\android-ndk-r10e/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++'. Output:
      ===================
      ===================
      Maybe you forgot to setup the environment?
      Error while parsing file C:\Qt\Examples\Qt-5.12.2\widgets\widgets\tetrix\tetrix.pro. Giving up.
      

      Can someone put me through please?

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Abdulmueez As stated here: https://doc.qt.io/qt-5/android-getting-started.html starting with Qt 5.12 you should use a NDK newer than r10e. So, I suggest to install newer NDK. Starting with Qt 5.12 CLang instead of GCC is required which provided with newer NDKs.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • A Offline
        A Offline
        Abdulmueez
        wrote on last edited by
        #3

        I have installed the latest version and now while trying to run on my android phone, I get these 2 errors
        :-1: error: error: cannot find -lc++
        :-1: error: linker command failed with exit code 1 (use -v to see invocation)

        jsulmJ 1 Reply Last reply
        0
        • A Abdulmueez

          I have installed the latest version and now while trying to run on my android phone, I get these 2 errors
          :-1: error: error: cannot find -lc++
          :-1: error: linker command failed with exit code 1 (use -v to see invocation)

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Abdulmueez Delete build folder, run qmake and rebuild

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Abdulmueez
            wrote on last edited by
            #5

            The errors don't go away after applying the recommended changes.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Abdulmueez
              wrote on last edited by
              #6

              2019-07-09T11:10:18 Clang Code Model: Error: The clangbackend executable "C:\Qt\Tools\QtCreator\bin\clangbackend.exe" could not be started (timeout after 10000ms).
              Running Windows Runtime device detection.
              C:/Qt/5.12.2/winrt_armv7_msvc2015/bin/winrtrunner.exe --list-devices
              Running Windows Runtime device detection.
              C:/Qt/5.12.2/winrt_armv7_msvc2015/bin/winrtrunner.exe --list-devices
              Running Windows Runtime device detection.
              C:/Qt/5.12.2/winrt_armv7_msvc2015/bin/winrtrunner.exe --list-devices
              Found 1 Windows Runtime devices.
              Found 1 Windows Runtime devices.
              Found 1 Windows Runtime devices.
              Project ERROR: Cannot run compiler 'cl'. Output:

              ===================
              Maybe you forgot to setup the environment?
              Error while parsing file C:\Qt\Examples\Qt-5.12.2\quick\positioners\positioners.pro. Giving up.
              I have the above message in my general message tab

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

                Hi,

                Why are you trying to compile for WinRT since you want your application to run on Android ?

                Also, cl missing usually means that you don't have Visual Studio installed for C++.

                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
                0
                • A Offline
                  A Offline
                  Abdulmueez
                  wrote on last edited by
                  #8

                  Hmm, I have visual studio installed already, and about compiling for winrt, all I do is click on the compile for android v7a... and then click on run.
                  Isn't that the right step to follow.

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

                    Did you install all the tools needed for Android development ? Like the SDK and NDK ?

                    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
                    0
                    • A Offline
                      A Offline
                      Abdulmueez
                      wrote on last edited by
                      #10

                      0_1562706163820_Screenshot (20).png
                      Yes, I have them both installed.

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

                        Then either you are currently using the wrong Kit or you modified one. The build logs shows that you are trying to build your application with the 64bit Visual Studio 2015 build of Qt.

                        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
                        0
                        • A Offline
                          A Offline
                          Abdulmueez
                          wrote on last edited by
                          #12

                          No, that's for something else.
                          These are the messages generated in the issues, general messages and compile output tab
                          2_1562750362512_Screenshot (23).png 1_1562750362511_Screenshot (22).png 0_1562750362511_Screenshot (21).png.

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

                            There have been several threads recently about that precise error.

                            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
                            0
                            • M Offline
                              M Offline
                              MajidKamali
                              wrote on last edited by
                              #14

                              I saw somewhere that ndk 20 is not compatible with Qt. (I can not remember where and why).
                              It has same errors as you (linker error)
                              Install ndk 19

                              1 Reply Last reply
                              1
                              • A Offline
                                A Offline
                                Abdulmueez
                                wrote on last edited by
                                #15

                                Thanks a lot to everyone, after installing ndk 19, everything seems to work fine.

                                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