13

I'm using Qt to build an Android Qt Quick app.

However, the base size is around 27 MB, which is huge for an initial size.

How do I reduce this size?

2 Answers 2

8

If you you don't want to use Ministro Service, you should include only the necessary Qt modules. Omitting the unnecessary modules will reduce the APK size significantly. This is a quote from BogDan Vatra the man who ported Qt to Android :

Qt files can go slightly over 40Mb/platform if you are going to use all of Qt modules. Of course your application doesnt need all the modules, so, if your application uses only Qt Quick Controls + Qt SVG + Qt Multimedia + Qt Sensors + Qt XML modules, Qt files (libs + plugins + additional files) are ~20Mb/platform and your APK will be ~10Mb.

You can see Choosing the right deploying system

Sign up to request clarification or add additional context in comments.

1 Comment

QtCreator already do that automatically. Is your suggestion will reached with another way? Also please note that huge portion of size is related to libQt5Core.so and libQtGui.so (together 7.3 MB).
2

Yes. You are most likely bundling Qt itself with your app. That's the default setting in Qt Creator. Go into your project settings (the Projects button to the left of the UI) and under Android/Run/Make Install, click on the Details button. There you can switch the Qt Deployment from Bundle to use Ministro Service.

This way your apk will be a lot smaller, but you need to install the Ministro Service from Play Store. Ministro contains Qt libraries that other apps can use.

Hope that helps...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.