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. Can not run program on Android emulator
Forum Updated to NodeBB v4.3 + New Features

Can not run program on Android emulator

Scheduled Pinned Locked Moved Mobile and Embedded
14 Posts 5 Posters 14.6k 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.
  • R Offline
    R Offline
    rom8726
    wrote on 15 Apr 2014, 10:46 last edited by
    #1

    I use Qt5.2.0. I tried to run my small program on emulator that I launched, but every time Qt Creator launching new copy of emulator, and after new copy was loaded - Creator shooting installation error...

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on 15 Apr 2014, 11:30 last edited by
      #2

      Did you get any details about the installation error?

      http://anavi.org/

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kenjichanhkg
        wrote on 15 Apr 2014, 13:00 last edited by
        #3

        For me, I just can't delopy to the emulator at all. I don't know how to define a "compatible device"

        https://dl.dropbox.com/s/2003xf01s4nh92l/no_compatible_device.png

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

          I think Qt 5.2.0 has an issue with the latest Android SDK update. But there is a workaround for that. Try this :

          In QtCreator -> Projects -> BuildEnvironment add the variable

          ANDROID_TARGET_ARCH=default/armeabi-v7a

          Then the AVDs are shown as compatible.

          Source:
          http://stackoverflow.com/questions/22238649/qt5-for-android-incompatible-abi

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

            Hi, I think there is a bug if you are using the latest android SDK, the AVD names contain a "/" or something and Qt Creator cannot parse it correctly sometimes, there are some other threads about that bug here in the forums maybe do a search.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kenjichanhkg
              wrote on 16 Apr 2014, 01:31 last edited by
              #6

              ANDROID_TARGET_ARCH=default/armeabi-v7a

              This works! But I still can't deploy to the emulator. The emulator takes 10 minutes to startup, and then at the end, failed to deploy. If I run again, it starts another emulator.....what the.... I know that might be android SDK's fault as emulator is slow ...and almost unusable.

              Now I'm not hoping to speed up the emulator. I just want to know if you guys know how to connect/deploy to the emulator already there and not starting a new one, wait 10 minutes and end up fail again...

              1 Reply Last reply
              0
              • X Offline
                X Offline
                Xander84
                wrote on 16 Apr 2014, 01:38 last edited by
                #7

                I don't think you can with Qt 5.2, maybe you can try the Qt 5.3 beta and see if that bug is fixed or use an older version of the Android SDK :/

                I only debug my apps on an real Android device, that works most of the time at least.. the default Android emulator is quite useless in my opinion.

                Another solution if you have to use the emulator is to deploy the app manually, either with the adb tool or some other way you only have to get the apk file on the "device" somehow
                @
                adb install <path_to_apk>
                @
                if you don't need the live debugger console this might be a workaround for now, at least you can run the app, maybe you manage to connect the debugger to the running app, never tried that myself though.

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cezmen
                  wrote on 16 Apr 2014, 01:57 last edited by
                  #8

                  Regarding the slowness of Android Emulator, my suggestion is :

                  (1) go to Android SDK Manager and install the following :

                  • Intel x86 atom system image
                  • Intel x86 Emulator Accelerator HAXM
                    (2) on QtCreator, add the "Android for x86" kit to your project (under Project -> Add Kit)
                    (3) When building & deploying, create a new AVD (Create Android Virtual Device) and select "x86" as the ABI

                  In short : use "armeabi-v7a" ABI when deploying your App to a real Android device and "x86" ABI for emulation.

                  Android emulation runs much faster in this manner.

                  https://software.intel.com/en-us/android/articles/speeding-up-the-android-emulator-on-intel-architecture

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kenjichanhkg
                    wrote on 16 Apr 2014, 01:58 last edited by
                    #9

                    Good idea! I'll try that at home tonight ^.^

                    Actually I don't have an android phone, planing to buy one!

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kenjichanhkg
                      wrote on 16 Apr 2014, 02:02 last edited by
                      #10

                      Great info!! Thx!

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

                        @cezmen yeah that is a good idea in general, but I had only problems with the x86 build and Qt apps. At least I had lots of crashes with QML apps on the x86 Android platform, but the apps run great on ARM architecture, or is that a weird bug!? My app just kept crashing at startup with some weird native error I can't recall atm.
                        Anyway I like the HAXM emulator for Android SDK apps written in Java, just saying that I could't not get my app working on the x86 build (without any external libraries other than Qt itself) :(

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          kenjichanhkg
                          wrote on 16 Apr 2014, 02:28 last edited by
                          #12

                          Sounds like the x86 build is buggy or unmaintained

                          1 Reply Last reply
                          0
                          • C Offline
                            C Offline
                            cezmen
                            wrote on 16 Apr 2014, 03:06 last edited by
                            #13

                            You may try Qt 5.3.0 RC, which can be download now from http://download.qt-project.org/snapshots/qt/5.3/.

                            It is very likely that it will be much more stable with the latest Android SDK tools version (22.6).

                            I currently use Qt 5.2.1 (for Android and iOS) with Android SDK tools 22.3, and the Android Emulator works fine with the x86 ABI.

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              kenjichanhkg
                              wrote on 16 Apr 2014, 03:08 last edited by
                              #14

                              Like x 999

                              1 Reply Last reply
                              0

                              1/14

                              15 Apr 2014, 10:46

                              • Login

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