Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt for Android. 'Deploy to Android device' error!!

Qt for Android. 'Deploy to Android device' error!!

Scheduled Pinned Locked Moved Installation and Deployment
15 Posts 3 Posters 18.9k 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.
  • p3c0P Offline
    p3c0P Offline
    p3c0
    Moderators
    wrote on last edited by
    #6

    It seems that you donot have the mingw32 compiler installed. Download it and install to C:\MingW.
    Or
    If you have downloaded individual packages, you need to make sure that mingw32-make is in the PATH environment.

    Then compile the application.

    157

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zing0000
      wrote on last edited by
      #7

      I just got a simple Qt app to launch in the Android emulator, so I hope these comments will help others.

      1. I am using the Android bundle
        adt-bundle-windows-x86_64-20130917
        ...and the latest NDK
        android-ndk-r9
        and everything is 64-bit.

      2. As I installed under "Program Files", I made sure that paths and Env Variables use the Progra~1 format (that was tilde) to avoid problems with spaces.

      3. The Qt versions look like this
        !http://sdrv.ms/17lfuji()!

      4. the Build settings are then
        http://sdrv.ms/17lfAaE

      5. Setting up the Kit as,
        http://sdrv.ms/19rD0gp

      6. I created an AVD for Android-10 - I think that may be the only one definitely supported. Choose a small screen cause it is quite slow.

      7. I started the AVD and waited for it to finish launching in the emulator.

      8. Then I "Deploy Project guyhello" from the QtCreator drop-down menu.

      9. Here is the report from the "Compile Output"
        http://sdrv.ms/17lgpAb

      10. and finally for completeness, here was the app code
        @#include <QCoreApplication>
        #include <QPushButton>

      int main(int argc, char *argv[])
      {
      QCoreApplication app(argc, argv);
      QPushButton button("Hello morons!");

      button.show();
      
      return app.exec();
      

      }
      @

      1. The App shows up in the grid on the emulator, and clicking it briefly shows a banner before crashing.

      Always one more bug to find....

      Good luck!

      1 Reply Last reply
      0
      • P Offline
        P Offline
        parkir
        wrote on last edited by
        #8

        i almost solve my problem...just download and use this version of Qt..
        "link":http://necessitas.kde.org/
        you dont need to change the settings just a simple install.
        The emulator still not work but i test my code on my tablet.
        While i have connected it with my Pc the program starts running on tablet.

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #9

          Hi,

          Necessitas uses Qt4 so you would not be able to use the Qt5 features. Also Qt5 is the official port for Android.

          157

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            zing0000
            wrote on last edited by
            #10

            Success!

            In my previous report, the app was deployed but gave a blank screen when launched. I think the issue relates to the ABI for the shared library libguyhello.so which is in a folder
            guyhello\android\libs\armeabi-v7a

            The default AVD using Android-10 seems to only recognise the basic armeabi and I could not find a way of generating that.

            So I created a new AVD with Android-18 and changed the run settings to match.
            !http://sdrv.ms/1hLW3oC(run settings)!

            Always start the emulator first and let it fully initilaize before trying to deploy the App.

            Then it works!
            !http://sdrv.ms/1hLXljF(success)!

            I was also able to debug and stop at a breakpoint.

            1 Reply Last reply
            0
            • P Offline
              P Offline
              parkir
              wrote on last edited by
              #11

              zing0000.. could you post the guide that you follow and install Qt5 with Android, because i think that i tried a lot and i follow many guides without result
              And if you want give us some prt scs from the settings that you change.
              Thanks in advance!

              1 Reply Last reply
              0
              • P Offline
                P Offline
                parkir
                wrote on last edited by
                #12

                p3c0.. i am new in Qt family, i have almost one month that i am working with Qt. I am student and my dissertation is about Qt with android.
                I tried to install Qt5 but as i already told you i couldn't start the emulator and test my code.
                The necessitas version of Qt, i think so, make things look simply, just install and nothing have to change, connect the android device and run the code.. :)

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  zing0000
                  wrote on last edited by
                  #13

                  Try and identify where the problem lies. For example, I use

                  1. Qt5.1.0 - simple install

                  2. Android SDK - I use the bundle which includes eclipse. Pre-requisites are Java JDK (not JRE). Be consistent, either 32 or 64-bit.

                  3. Android NDK - just unzip. Pre-requisites are Python and Cygwin.

                  4. here are some notes I made about cygwin for my own use.

                  • (2013) execute setup-x86_64.exe at cygwin website.
                  • search for "make".
                    ** Get GNU make 3.82.90.1 (for Android NDK).
                  • toggle selections. Only need 'bin'
                  • hit 'next' to download. Takes a while, more than 5 minutes, lots of small files

                  It is a complex environment to build, but I definitely agree with p3c0 that all the good stuff is in Qt5. That's where you need to be!

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    parkir
                    wrote on last edited by
                    #14

                    I follow the advice both of you. I install Qt5.1.1, I set the SDK and NDK path. correctly, I download and install cygwin from website (I didn't understand what do you mean and instructions about "make")

                    but the problem still exist...
                    if you see my last prt sc above, it is exactly what there is in my Project's settings
                    and the error now is..
                    @00:41:29: Starting: "mingw32-make"
                    qtcreator_ctrlc_stub: Command line failed: mingw32-make
                    00:41:29: The process "mingw32-make" exited with code -1.
                    Error while building/deploying project Test (kit: Android for arm (GCC 4.8, Qt 5.1.1))
                    When executing step 'Make'
                    @

                    do you have an idea about this...

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      parkir
                      wrote on last edited by
                      #15

                      I think so I understand what you mean about "make"

                      !http://s1310.hizliresim.com/1g/h/tllhn.png(qt)!

                      So, I install this version but nothing good happen!! :( :(
                      the same error!

                      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