building/deploying for Android takes forever
-
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...
-
@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?
@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.
-
@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.
@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?
-
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?
-
@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.
-
@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.
@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...