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. building/deploying for Android takes forever
QtWS25 Last Chance

building/deploying for Android takes forever

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
8 Posts 4 Posters 819 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    Hi all -

    When I build my app for the desktop, it takes about 5 seconds. When I build for the Android, it takes more like a minute. After the build is complete, and I press "Run" in Creator, it takes another minute to actually start in the emulator.

    Can something be done about this? I notice in my build settings for Android, I have "all" selected for "Targets." Could this be the cause of the slowness? And if so, which subset of these targets do I need?

    Thanks...

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      You are running things in a java environment, I guess. It can not be fast.

      mzimmersM 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        You are running things in a java environment, I guess. It can not be fast.

        mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #3

        @JoeCFD said in building/deploying for Android takes forever:

        You are running things in a java environment, I guess. It can not be fast.

        • sigh *

        What if invest in a gamer-quality i9?

        Also, why does it seem to repeat the build when I press run?

        JoeCFDJ 1 Reply Last reply
        0
        • mzimmersM mzimmers

          @JoeCFD said in building/deploying for Android takes forever:

          You are running things in a java environment, I guess. It can not be fast.

          • sigh *

          What if invest in a gamer-quality i9?

          Also, why does it seem to repeat the build when I press run?

          JoeCFDJ Offline
          JoeCFDJ Offline
          JoeCFD
          wrote on last edited by JoeCFD
          #4

          @mzimmers You can try to select "Do not build anything" for build before deploy on Options->Build&Run->General->Build&Run group. If you do not change your setting, you can simply click run only without bothering to build.

          You see Qt has better idea. Make the same code and compile it on different platforms. And it runs fast. Java can be built on any platform and then can be run anywhere. This is not a great idea.

          mzimmersM 1 Reply Last reply
          0
          • JoeCFDJ JoeCFD

            @mzimmers You can try to select "Do not build anything" for build before deploy on Options->Build&Run->General->Build&Run group. If you do not change your setting, you can simply click run only without bothering to build.

            You see Qt has better idea. Make the same code and compile it on different platforms. And it runs fast. Java can be built on any platform and then can be run anywhere. This is not a great idea.

            mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #5

            @JoeCFD said in building/deploying for Android takes forever:

            @mzimmers You can try to select "Do not build anything" for build before deploy on Options->Build&Run->General->Build&Run group. If you do not change your setting, you can simply click run only without bothering to build.

            I tried this, and it greatly sped up the run step...thanks. I guess the only downside for this is I need to remember to build whenever I make changes (currently it does that automatically). Pretty good trade-off, IMO.

            You see Qt has better idea. Make the same code and compile it on different platforms. And it runs fast. Java can be built on any platform and then can be run anywhere. This is not a great idea.

            You don't have to convince me of that. But, as long as I'm building APKs for Android, I'm stuck with Java, right?

            1 Reply Last reply
            0
            • mzimmersM Offline
              mzimmersM Offline
              mzimmers
              wrote on last edited by
              #6

              I've noticed that my build seems to take a long time after this console line appears:

              Starting a Gradle Daemon, 12 busy and 3 incompatible and 3 stopped Daemons could not be reused, use --status for details

              Is there some reason this should take a long time on a reasonably capable Windows system?

              1 Reply Last reply
              0
              • TomZT Offline
                TomZT Offline
                TomZ
                wrote on last edited by
                #7

                @mzimmers said in building/deploying for Android takes forever:

                When I build my app for the desktop, it takes about 5 seconds. When I build for the Android, it takes more like a minute.

                For reference, on my machine a build for Linux or for Android takes approx the same time.

                Only the first time after a boot the gradle thingy starts in the background this takes longer, but after that its instant.

                I never start anything in the emulator (just on device) so all I do is create a signed APK, which ends with;

                Android package built successfully in 5.732 ms.

                This is simply using cmake, would probably take the same amount of time in QtCreator.

                @JoeCFD said in building/deploying for Android takes forever:

                You are running things in a java environment, I guess. It can not be fast.

                Building is not done in a Java environment. Deploying itself isn't really either.

                mzimmersM 1 Reply Last reply
                0
                • TomZT TomZ

                  @mzimmers said in building/deploying for Android takes forever:

                  When I build my app for the desktop, it takes about 5 seconds. When I build for the Android, it takes more like a minute.

                  For reference, on my machine a build for Linux or for Android takes approx the same time.

                  Only the first time after a boot the gradle thingy starts in the background this takes longer, but after that its instant.

                  I never start anything in the emulator (just on device) so all I do is create a signed APK, which ends with;

                  Android package built successfully in 5.732 ms.

                  This is simply using cmake, would probably take the same amount of time in QtCreator.

                  @JoeCFD said in building/deploying for Android takes forever:

                  You are running things in a java environment, I guess. It can not be fast.

                  Building is not done in a Java environment. Deploying itself isn't really either.

                  mzimmersM Offline
                  mzimmersM Offline
                  mzimmers
                  wrote on last edited by mzimmers
                  #8

                  @TomZ yeah, clearly the package build isn't what's taking the time.

                  BUILD SUCCESSFUL in 1m 21s
                  42 actionable tasks: 8 executed, 34 up-to-date
                  Android package built successfully in 87.413 ms.
                  -- File: C:/Users/Michael.Zimmers/Qt_projects/build-nga_demo-Android_Qt_6_4_2_Clang_arm64_v8a-Release/android-build//build/outputs/apk/release/android-build-release-unsigned.apk
                  09:51:20: The process "C:\Qt\6.4.2\mingw_64\bin\androiddeployqt.exe" exited normally.
                  09:51:20: Elapsed time: 01:30.

                  That's for an application with a couple dozen small QML files.

                  EDIT:

                  And then double it, because I keep forgetting to re-check the "Sign package" button. I really wish that setting were persistent...

                  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