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

Android emulator

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 3 Posters 4.2k 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.
  • T Offline
    T Offline
    tomy
    wrote on 21 Feb 2017, 22:52 last edited by tomy
    #1

    Hi guys,

    Am I allowed to ask a question? Do you use a Android emulator? What AVD do you use and what processor architecture (Arm or x86)? What ever I ask no one wants to answer and solve the issue it's more than 10 days I'm involved in it. Wherever I want to ask they tell me that since I'm using Qt Creator "if I ask here I will get a better answer" but I got no answer solving my issue completely. I'm thankful of the time you consider for helping others, but here is also a forum for asking questions.
    My question is "what is THE PROBLEM with my threads"?
    Does it mean that no one uses an emulator? That is, a programmar of Qt developing Android apps should have many real devices to test each app on them?

    I'm really exhausted. If I return to my first place "I Will Never come Near to programming".

    J 1 Reply Last reply 22 Feb 2017, 05:48
    0
    • T tomy
      21 Feb 2017, 22:52

      Hi guys,

      Am I allowed to ask a question? Do you use a Android emulator? What AVD do you use and what processor architecture (Arm or x86)? What ever I ask no one wants to answer and solve the issue it's more than 10 days I'm involved in it. Wherever I want to ask they tell me that since I'm using Qt Creator "if I ask here I will get a better answer" but I got no answer solving my issue completely. I'm thankful of the time you consider for helping others, but here is also a forum for asking questions.
      My question is "what is THE PROBLEM with my threads"?
      Does it mean that no one uses an emulator? That is, a programmar of Qt developing Android apps should have many real devices to test each app on them?

      I'm really exhausted. If I return to my first place "I Will Never come Near to programming".

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 22 Feb 2017, 05:48 last edited by
      #2

      @tomy I use Android emulator, I start it from QtCreator. I use x86 there as it is faster than emulating ARM CPU. I don't have any issues with the emulator. I develop on Linux, on a PC and laptop: both work just fine. I can run my app even on my Android phone (after switching to ARM v7).
      What exactly does not work for you? Are you on Windows or Linux? If on Windows: do you have any anti-virus software running (try to switch it off temporarily)?
      You can try to start a simple Java Android app from AndroidStudio (you installed it as far as I know) to check first whether it is working there.

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

      1 Reply Last reply
      1
      • T Offline
        T Offline
        tomy
        wrote on 22 Feb 2017, 09:28 last edited by tomy
        #3

        @jsulm

        Thanks for your reply. I use Windows (7 x64) and even if I stop the antivirus I always get the error:
        Error while building/deploying project QApp_1 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0)) When executing step "Deploy to Android device"

        I think the problem is exactly of the ARM AVD (and you used x86 and fortunately did not face that issue)

        Let me please ask you this: what is the philosophy of using x86 and then switching to ARM?
        Is my assumption, as follows, correct?

        • By Qt Creator we create an Android app => use x86 kit => click on Run in Debug mode => use an x86 AVD => see the result.

        • Then if the result is OK => return back to the project => change the kit (from x86 to ARM) => run in Debug mode (without using an ARM AVD) => run in Release mode (again without using an ARM AVD) => publish the app for real devices that their CPU architecture is ARM.

        J 1 Reply Last reply 22 Feb 2017, 12:24
        0
        • T tomy
          22 Feb 2017, 09:28

          @jsulm

          Thanks for your reply. I use Windows (7 x64) and even if I stop the antivirus I always get the error:
          Error while building/deploying project QApp_1 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0)) When executing step "Deploy to Android device"

          I think the problem is exactly of the ARM AVD (and you used x86 and fortunately did not face that issue)

          Let me please ask you this: what is the philosophy of using x86 and then switching to ARM?
          Is my assumption, as follows, correct?

          • By Qt Creator we create an Android app => use x86 kit => click on Run in Debug mode => use an x86 AVD => see the result.

          • Then if the result is OK => return back to the project => change the kit (from x86 to ARM) => run in Debug mode (without using an ARM AVD) => run in Release mode (again without using an ARM AVD) => publish the app for real devices that their CPU architecture is ARM.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 22 Feb 2017, 12:24 last edited by
          #4

          @tomy Actually I use x86 most of the time. Only if I want to test on ARM device (or if you want to upload your app to the app store) I switch to ARMv7. Most of the time it really doesn't matter whether you use x86 or ARMv7 while developing. You can even upload both x86 and ARM to app store as there are Android devices using x86 CPUs.

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

          T 1 Reply Last reply 22 Feb 2017, 13:02
          1
          • J jsulm
            22 Feb 2017, 12:24

            @tomy Actually I use x86 most of the time. Only if I want to test on ARM device (or if you want to upload your app to the app store) I switch to ARMv7. Most of the time it really doesn't matter whether you use x86 or ARMv7 while developing. You can even upload both x86 and ARM to app store as there are Android devices using x86 CPUs.

            T Offline
            T Offline
            tomy
            wrote on 22 Feb 2017, 13:02 last edited by tomy
            #5

            @jsulm said in Android emulator:

            @tomy Actually I use x86 most of the time. Only if I want to test on ARM device (or if you want to upload your app to the app store) I switch to ARMv7.

            I meant this point. You have run and app using x86 and want to re-run using ARM. Have you ever tested it? I mean, can we say that when preparing the app for ARM we don't need seeing the result on a ARM AVD (because it's very slow and also may make errors) and just run the code and fix the code errors (if any) and then publish the app?

            Most of the time it really doesn't matter whether you use x86 or ARMv7 while developing.

            But we can't run an app only using x86 kit and publish it for both architectures. Aren't I right?

            You can even upload both x86 and ARM to app store as there are Android devices using x86 CPUs.

            good point, thank you.

            J 1 Reply Last reply 23 Feb 2017, 05:12
            0
            • T tomy
              22 Feb 2017, 13:02

              @jsulm said in Android emulator:

              @tomy Actually I use x86 most of the time. Only if I want to test on ARM device (or if you want to upload your app to the app store) I switch to ARMv7.

              I meant this point. You have run and app using x86 and want to re-run using ARM. Have you ever tested it? I mean, can we say that when preparing the app for ARM we don't need seeing the result on a ARM AVD (because it's very slow and also may make errors) and just run the code and fix the code errors (if any) and then publish the app?

              Most of the time it really doesn't matter whether you use x86 or ARMv7 while developing.

              But we can't run an app only using x86 kit and publish it for both architectures. Aren't I right?

              You can even upload both x86 and ARM to app store as there are Android devices using x86 CPUs.

              good point, thank you.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 23 Feb 2017, 05:12 last edited by
              #6

              @tomy Sure, you should test on ARM as well. But the point is: you don't have to do it all the time.
              For most apps it doesn't matter whether they run on x86 or ARM.
              So, from my point of view it is perfectly fine to test on x86 emulator most of the time and then test on ARM (and real hardware, not only emulator!) regularly.
              To publish for both architecture you need to build for both using both Kits, yes.

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

              T 1 Reply Last reply 23 Feb 2017, 10:53
              1
              • J jsulm
                23 Feb 2017, 05:12

                @tomy Sure, you should test on ARM as well. But the point is: you don't have to do it all the time.
                For most apps it doesn't matter whether they run on x86 or ARM.
                So, from my point of view it is perfectly fine to test on x86 emulator most of the time and then test on ARM (and real hardware, not only emulator!) regularly.
                To publish for both architecture you need to build for both using both Kits, yes.

                T Offline
                T Offline
                tomy
                wrote on 23 Feb 2017, 10:53 last edited by tomy
                #7

                @jsulm

                Sure, you should test on ARM as well. But the point is: you don't have to do it all the time.
                For most apps it doesn't matter whether they run on x86 or ARM.

                Frankly speaking, It makes me rather confused! Do you mean "in most of the apps", an app run by x86 will work on ARM arch either? If so, then why do we bother ourselves even with dealing with ARM system images/AVD-s etc?

                So, from my point of view it is perfectly fine to test on x86 emulator most of the time and then test on ARM (and real hardware, not only emulator!) regularly.
                To publish for both architecture you need to build for both using both Kits, yes.

                Yes, I got that part completely. Thanks.

                J J 2 Replies Last reply 23 Feb 2017, 11:01
                0
                • T tomy
                  23 Feb 2017, 10:53

                  @jsulm

                  Sure, you should test on ARM as well. But the point is: you don't have to do it all the time.
                  For most apps it doesn't matter whether they run on x86 or ARM.

                  Frankly speaking, It makes me rather confused! Do you mean "in most of the apps", an app run by x86 will work on ARM arch either? If so, then why do we bother ourselves even with dealing with ARM system images/AVD-s etc?

                  So, from my point of view it is perfectly fine to test on x86 emulator most of the time and then test on ARM (and real hardware, not only emulator!) regularly.
                  To publish for both architecture you need to build for both using both Kits, yes.

                  Yes, I got that part completely. Thanks.

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 23 Feb 2017, 11:01 last edited by
                  #8

                  @tomy No, not at all! What I mean is: you write your app in C++ not Assembler and as long as you do not do any low-level stuff which depends on CPU architecture you do not care whether it is x86 or ARM. You just need to build and test for each platform at the end. That means: in most cases during developing you test on one architecture (for example x86). Then later if you want to release it (upload to app store) you build it for all architectures you want to support and test.

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

                  T 1 Reply Last reply 23 Feb 2017, 13:34
                  1
                  • T tomy
                    23 Feb 2017, 10:53

                    @jsulm

                    Sure, you should test on ARM as well. But the point is: you don't have to do it all the time.
                    For most apps it doesn't matter whether they run on x86 or ARM.

                    Frankly speaking, It makes me rather confused! Do you mean "in most of the apps", an app run by x86 will work on ARM arch either? If so, then why do we bother ourselves even with dealing with ARM system images/AVD-s etc?

                    So, from my point of view it is perfectly fine to test on x86 emulator most of the time and then test on ARM (and real hardware, not only emulator!) regularly.
                    To publish for both architecture you need to build for both using both Kits, yes.

                    Yes, I got that part completely. Thanks.

                    J Offline
                    J Offline
                    J.Hilk
                    Moderators
                    wrote on 23 Feb 2017, 11:36 last edited by J.Hilk
                    #9

                    @tomy

                    Hey, when I first at my company, I had some serious t rouble with AVD too. My precursor only used Android-VM, he headn't heard of USB-Debugging and I was told to do so as well.

                    For about a week I struggle with it,

                    • The VM took forever to start
                    • Mouse and Key Inouts had a serious delay
                    • The App had to run with a low resolution, or everything would be worse

                    in the end i put my food down, bought a Tablet and debugged on a real device.

                    But thinking back on it, I might know what the problem is you have.

                    I had to start the AVD before I tried to build and deploy my app. The startup of the Andorid OS took about 5 min, apparently longer than the deploy-timeout.
                    Because of that, I reguarly would get errors when executing step "Deploy to Android device

                    hope it helps?


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    1 Reply Last reply
                    0
                    • J jsulm
                      23 Feb 2017, 11:01

                      @tomy No, not at all! What I mean is: you write your app in C++ not Assembler and as long as you do not do any low-level stuff which depends on CPU architecture you do not care whether it is x86 or ARM. You just need to build and test for each platform at the end. That means: in most cases during developing you test on one architecture (for example x86). Then later if you want to release it (upload to app store) you build it for all architectures you want to support and test.

                      T Offline
                      T Offline
                      tomy
                      wrote on 23 Feb 2017, 13:34 last edited by
                      #10

                      @jsulm
                      Good info, got it, thanks.
                      I will make a thread on using app store (oh! sorry Google Play). :-)

                      @J.Hilk

                      Hey,

                      Hi, welcome to thread! :)

                      I, too, think starting the AVD considered for testing an app before running it, may be good and helpful. I will do that.

                      1 Reply Last reply
                      0

                      9/10

                      23 Feb 2017, 11:36

                      • Login

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