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. Qt5.2.1 Android Windows7
Forum Update on Monday, May 27th 2025

Qt5.2.1 Android Windows7

Scheduled Pinned Locked Moved Mobile and Embedded
17 Posts 5 Posters 5.2k 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.
  • X Offline
    X Offline
    Xander84
    wrote on 1 Apr 2014, 12:37 last edited by
    #2

    well then you don't have a compatible device connected and no suitable emulator is setup!?
    hard to help if you don't tell us what devices you have connected or show us a screenshot from the device selector dialog maybe.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MartynW
      wrote on 1 Apr 2014, 12:46 last edited by
      #3

      If you want to deploy and run your code on an Android device you have to provide that device; either as a real device connected to your Windows 7 machine via usb or as a virtual device running as an emulation on your Windows machine. Either way, the device has to have the CPU appropriate to the target that you specify when building your Qt app.

      I guess that either you have no device available or if you do then it does not match the machine code that you selected to generate in Qt.

      If you want to use a physical device then you need to set it up in 'developer mode' so the comms to Qt is available. Otherwise use the Android Virtual Device Manager to create a virtual device.

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fp615
        wrote on 2 Apr 2014, 20:15 last edited by
        #4

        I confirm the problem. Tested on 2 different workstations.

        Unistalled Qt 5.2.0 and installed Qt 5.2.1.
        Updated from adt-bundle-windows-x86_64-20130917 to adt-bundle-windows-x86_64-20140321
        from android-ndk-r9 to android-ndk-r9d
        from apache-ant-1.9.2 to apache-ant-1.9.3
        and when I press the "play/run" button a form appears listing all the virtual devices as incompatible. I didn't test with a real device....

        I will try to open a bug.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          fp615
          wrote on 2 Apr 2014, 20:17 last edited by
          #5

          I also got this message in "General message" panel

          Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
          Could not read qmake configuration file C:/Qt/Qt5.2.1/5.2.1/android_armv5/mkspecs/android-g++/qmake.conf.

          1 Reply Last reply
          0
          • X Offline
            X Offline
            Xander84
            wrote on 2 Apr 2014, 20:21 last edited by
            #6

            yeah that is why you need to add the ANDROID_NDK_ROOT environment variable!? if you didn't do that no wonder nothing is working :D

            1 Reply Last reply
            0
            • F Offline
              F Offline
              fp615
              wrote on 2 Apr 2014, 20:37 last edited by
              #7

              I donìt think I need to set that env variable... I didn't set before and it worked...

              I opened this bug report:
              https://bugreports.qt-project.org/browse/QTBUG-380641

              As you can read in the bug report, I set the SDK pointer to the old SDK and it is back working.

              1 Reply Last reply
              0
              • X Offline
                X Offline
                Xander84
                wrote on 2 Apr 2014, 20:41 last edited by
                #8

                It may be a bug, but what does it hurt to set the env variable? i have it set and it works but it may be some other problem.
                And the link isn't working here, "Issue Does Not Exist" :(

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  fp615
                  wrote on 2 Apr 2014, 20:55 last edited by
                  #9

                  bug is 38064, there is a 1 that shouldn't be in the url, sorry.

                  Can you please show me your env setting ? where does it point to ? Anyway, if the variable was necessary why should we had to setup the dirs in the kits ?

                  1 Reply Last reply
                  0
                  • X Offline
                    X Offline
                    Xander84
                    wrote on 2 Apr 2014, 21:04 last edited by
                    #10

                    I just set it to the NDK path, don't ask me why we have to do that but it works... Also adb sometimes crashes in my experience, so you should kill the task or restart your PC. That is an android SDK bug of course and has nothing to do with Qt.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      MartynW
                      wrote on 3 Apr 2014, 08:44 last edited by
                      #11

                      bq. "The NDK is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. For certain types of apps, this can be helpful so you can reuse existing code libraries written in these languages...

                      suggests the NDK is required because we want to use the Qt libraries and nothing will run without it.

                      Maybe one of your setups has it implicitly located on the search path so it doesn't complain that it can't find it but with the second setup the search path is slightly different and so it needs that explicit env var?

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        fp615
                        wrote on 3 Apr 2014, 09:09 last edited by
                        #12

                        Ni Martyn, NDK is required and installed. There is a place in Qt Creator configuration where you set its directory path. The env variable should not be necessary.

                        It seems to be a problem of the new SDK (released on March 21):
                        https://bugreports.qt-project.org/browse/QTBUG-38064

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          MartynW
                          wrote on 3 Apr 2014, 09:18 last edited by
                          #13

                          You are right of course. I was thinking of the creator config, I dunno why I latched onto the env var - sorry!

                          1 Reply Last reply
                          0
                          • C Offline
                            C Offline
                            cezmen
                            wrote on 3 Apr 2014, 15:15 last edited by
                            #14

                            I believe there is an incompatibility between the latest Android SDK and Qt 5.2.1. My suggestion : downgrade the Android SDK to version 22.3. I had similar building issued with Android (Qt 5.2.1 for MacOS) and solved them with the following procedure :

                            http://qt-project.org/forums/viewreply/170048/

                            1 Reply Last reply
                            0
                            • X Offline
                              X Offline
                              Xander84
                              wrote on 3 Apr 2014, 15:42 last edited by
                              #15

                              I am using the latest Android SDk 22.6.2 with Qt 5.2.1 on windows without any problems (android-ndk-r9d and apache-ant-1.9.3)?
                              The only problem I had forever is that I can't get x86 android builds to work, the app is just crashing.. but arm builds work fine!?

                              1 Reply Last reply
                              0
                              • W Offline
                                W Offline
                                wwwronin
                                wrote on 4 Apr 2014, 01:58 last edited by
                                #16

                                I think is not the version of Android SDK. When I switch to the API14(4.0.0) ,the problem still exists. So I try to connect my Android Phone to the computer ,I found that there is a compatible device listed,but these virtual devices created earlier were still incompatible. And there is another problem, I packed my program into *.apk and instll it to my phone, it seems to be stranger ,for the running result is not the same with the desktop program ,such as : I set the gui element(like QPushButton) to alignment with the top of the Widget, it is correct in desktop program ,but is not correct in Android program. Why is that?

                                1 Reply Last reply
                                0
                                • X Offline
                                  X Offline
                                  Xander84
                                  wrote on 4 Apr 2014, 12:17 last edited by
                                  #17

                                  can you provide some screenshots?
                                  In most cases the alignment will be different because of the layout container and smaller spaces on mobile phones it might not fit on the screen or I don't know with any specifics.
                                  My apps look exactly the same on all devices, so I have no idea.

                                  1 Reply Last reply
                                  0

                                  11/17

                                  3 Apr 2014, 08:44

                                  • Login

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