Solved Android, installsize Release and Debug
-
Hello everyone,
I'm compiling my app for Android (Qt 5.10.1, armv);
I've, for debug purpose, so far only compiled the Debug version of my application. Now that I have finished the development for that, I switched to the release mode.
First of, its highly confusing that the generated APK - file has also
debug
in its name, but thats hopefully only a naming issue.But, I've also noticed that the apk file as well as the installed app have the same size in Debug as well as in Release, and thats kind of surprising.
I would have expected the release version to be significantly smaler.
Is this normal, or is maybe one of my qmake/make settings wrong?
Edit:
going through the build log, I noticed that Debugger-Dependencys are added, that seams kind of odd for a release build.Appending dependency from xml: plugins/qmltooling/libqmldbg_debugger.so Appending dependency from xml: plugins/qmltooling/libqmldbg_inspector.so Appending dependency from xml: plugins/qmltooling/libqmldbg_local.so Appending dependency from xml: plugins/qmltooling/libqmldbg_messages.so Appending dependency from xml: plugins/qmltooling/libqmldbg_native.so Appending dependency from xml: plugins/qmltooling/libqmldbg_nativedebugger.so Appending dependency from xml: plugins/qmltooling/libqmldbg_profiler.so Appending dependency from xml: plugins/qmltooling/libqmldbg_quickprofiler.so Appending dependency from xml: plugins/qmltooling/libqmldbg_server.so Appending dependency from xml: plugins/qmltooling/libqmldbg_tcp.so
And a whole bunch of QML-dependencies that I'm 100% sure Im not using, I know that, beacuse I removed those from my desktop deployment.
that would at least explain the huge amount of dependencies that are copied oO
Copying 786 dependencies from Qt into package.
-
Turns out I can answer my own question:
Searching the internets I found this stackoverflow topic:
The problem comes when calling androiddeployqt. If you look at the source, it creates a release package if it receives --release or also when it receives --sign. Qt Creator never passes the --release, so it compiles files as it should, but androiddeployqt only generates a release APK when you use a certificate, because Qt Creator passes the --sign
-
Turns out I can answer my own question:
Searching the internets I found this stackoverflow topic:
The problem comes when calling androiddeployqt. If you look at the source, it creates a release package if it receives --release or also when it receives --sign. Qt Creator never passes the --release, so it compiles files as it should, but androiddeployqt only generates a release APK when you use a certificate, because Qt Creator passes the --sign