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. [SOLVED] Qt 5.1 Installation Problem (for Android)
QtWS25 Last Chance

[SOLVED] Qt 5.1 Installation Problem (for Android)

Scheduled Pinned Locked Moved Mobile and Embedded
29 Posts 4 Posters 16.1k 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.
  • M Offline
    M Offline
    mikeosoft
    wrote on last edited by
    #2

    I'm not answering with any specific expertise, just my experience when I installed Qt 5.1.

    This may not solve your problem, but hopefully it will move you further along.

    In the QT folder you will find an executable called "MaintenanceTool" or I guess if you are on Windows "MaintenanceTool.exe".

    If you run that you will get three options:
    Package Manger (which lets you add and remove components) which includes options for Android.
    Update Components (which is generally worth doing).
    Remove All Components (which you probably don't want to do.

    My suggestion is to make sure you have the Android components installed.

    I can't help any more than that, my only Android development was a little playing in Java using Eclipse, that didn't amount to anything worthwhile.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Moster
      wrote on last edited by
      #3

      You have a desktop project and probably didnt install the qt for android version

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jdarnold
        wrote on last edited by
        #4

        Yeah, you need to make sure you very closely follow all the instructions for getting Android to run. For instance, I thought I had the right JDK installed, but I didn't and it lead to all sorts of headaches. You're sure you have all the Requirements mentioned in the Qt Creator page?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jdarnold
          wrote on last edited by
          #5

          BTW, your picture is of the Build, not the Run configurations. Click the Run button near the top, next to Build, to see the Android configurations.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Moster
            wrote on last edited by
            #6

            As I already mentioned, he wont get any android configurations on his current setup. It is clearly a Desktop project, not android. Btw, the run tab is correct on the picture. Thats not build :P

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kingsta
              wrote on last edited by
              #7

              Yes You totally right. I downloaded wrong Qt version. I download Qt for Android (Windows 32Bit)

              When I debug the a example of Qt on Android for x86 (GCC 4.4.3, Qt 5.1.1), "Create new AVD" window appears. I write the name and I press the OK Button. I get the error text.
              @compilation terminated.
              Makefile.Debug:706: recipe for target 'debug/main.o' failed
              mingw32-make[1]: *** [debug/main.o] Error 1
              mingw32-make[1]: Leaving directory 'D:/Other/C++/Qt/my codes/New/build-ortalama_hesaplayici-Desktop_Qt_5_1_0_MinGW_32bit-Debug'
              makefile:34: recipe for target 'debug' failed
              mingw32-make: *** [debug] Error 2
              19:37:53: The process "C:\Qt\Qt5.1.0\Tools\mingw48_32\bin\mingw32-make.exe" exited with code 2.
              Error while building/deploying project ortalama_hesaplayici (kit: Desktop Qt 5.1.0 MinGW 32bit)
              When executing step 'Make'
              19:37:53: Elapsed time: 00:01.
              19:39:49: Please wait, searching for a suitable device for target:android-16.
              Error while building/deploying project application (kit: Android for x86 (GCC 4.4.3, Qt 5.1.0))
              When executing step 'Deploy to Android device'@

              My Android Settings
              !http://t1307.hizliresim.com/1c/r/qpb7z.jpg(android)!
              What should I do?

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Moster
                wrote on last edited by
                #8

                I dont know exactly if it makes any difference, but you are using the x64 android NDK and not the one for x86/32bit. You could try this one

                You could also update your java version, more for security reasons :)

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kingsta
                  wrote on last edited by
                  #9

                  @Moster
                  You found a good point. I download x86 NDK and problem doesnt still solve

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kingsta
                    wrote on last edited by
                    #10

                    Now I can start the Android Simulator. But My program is not working on simulator. Simulator starts and only show the main android screen.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Moster
                      wrote on last edited by
                      #11

                      Dont you have a real device to test it?
                      The android emulator has problems with Qt.

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kingsta
                        wrote on last edited by
                        #12

                        [quote author="Moster" date="1374912963"]Dont you have a real device to test it?
                        The android emulator has problems with Qt. [/quote]

                        How can I connect my android phone with Qt? I find something below. There is a page that explain how to do that but I cant do that.

                        http://qt-project.org/doc/qtcreator-2.8/creator-developing-android.html#debugging-on-android-devices

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          Moster
                          wrote on last edited by
                          #13

                          What is your device? Maybe its android API level is too low.

                          1 Reply Last reply
                          0
                          • K Offline
                            K Offline
                            kingsta
                            wrote on last edited by
                            #14

                            I have a Samsung Galaxy Note 2. My android version is 4.1.2. I download my computer the android 16 and 17 API.

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              Moster
                              wrote on last edited by
                              #15

                              The Qt project should be android level 16 then. 17 wont work.
                              Btw, you have for sure enabled usb debugging in the android developer options?

                              1 Reply Last reply
                              0
                              • K Offline
                                K Offline
                                kingsta
                                wrote on last edited by
                                #16

                                Yes Usb Debugging is opened. I cant understand why dont we fix? :(

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  Moster
                                  wrote on last edited by
                                  #17

                                  There might be a problem with your adb/usb drivers.

                                  Can you open a shell/cmd, go to your android sdk folder, then platform-tools and type in "adb devices". Your phone should be connected. If it gets recognized, you will see the device there. If its not there, then there might be some driver problems.

                                  1 Reply Last reply
                                  0
                                  • K Offline
                                    K Offline
                                    kingsta
                                    wrote on last edited by
                                    #18

                                    I got the text;
                                    @List of devices attached
                                    4df7... device@

                                    Note: "..." means its continuing

                                    When I close the Usb Debugging Mode on my phone, I got only "List of devices attached" text.

                                    I guess driver has no problem. Am I right?

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      Moster
                                      wrote on last edited by
                                      #19

                                      Ye, thats good. But do you know what I just saw? You are using android for x86 and not armv7. Your note 2 has an ARM cpu and not x86.

                                      1 Reply Last reply
                                      0
                                      • K Offline
                                        K Offline
                                        kingsta
                                        wrote on last edited by
                                        #20

                                        You got good point. I moved the SDK and NDK to different folder. I changed android settings on Qt (SDK and NDK locations). I have a weird error. I got the error when I build. How can I fix?

                                        @:-1: error: SDK-NDK\ndk-x86\android-ndk-r9/platforms/android-14/arch-arm/: No such file or directory@

                                        Output:
                                        @17:06:19: Running steps for project qt_android2...
                                        17:06:19: Configuration unchanged, skipping qmake step.
                                        17:06:19: Starting: "C:\Qt\Qt5.1.0_Android\Tools\mingw48_32\bin\mingw32-make.exe"
                                        D:\Programs\Android SDK-NDK\ndk-x86\android-ndk-r9/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-g++ --sysroot=D:\Programs\Android SDK-NDK\ndk-x86\android-ndk-r9/platforms/android-14/arch-arm/ -Wl,-soname,libqt_android2.so -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libqt_android2.so main.obj mainwindow.obj moc_mainwindow.obj -LD:\Programs\Android\ SDK-NDK\ndk-x86\android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi-v7a -LD:\Programs\Android\ SDK-NDK\ndk-x86\android-ndk-r9/platforms/android-14/arch-arm//usr/lib -lgnustl_shared -lsupc++ -llog -lz -lm -ldl -lc -lgcc -LC:\Qt\Qt5.1.0_Android\5.1.0\android_armv7\lib -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2
                                        arm-linux-androideabi-g++: SDK-NDK\ndk-x86\android-ndk-r9/platforms/android-14/arch-arm/: No such file or directory
                                        makefile:147: recipe for target 'libqt_android2.so' failed
                                        mingw32-make: *** [libqt_android2.so] Error 1
                                        17:06:20: The process "C:\Qt\Qt5.1.0_Android\Tools\mingw48_32\bin\mingw32-make.exe" exited with code 2.
                                        Error while building/deploying project qt_android2 (kit: Android for arm (GCC 4.4.3, Qt 5.1.0))
                                        When executing step 'Make'
                                        17:06:20: Elapsed time: 00:01.@

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          Moster
                                          wrote on last edited by
                                          #21

                                          http://qt-project.org/forums/viewthread/30337/

                                          Same issue like this guy, are you also on windows 8 maybe?

                                          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