简体   繁体   English

Qt6 android 应用程序 - 非常大的构建大小

[英]Qt6 android application - very large build size

After the migration of the project from Qt5 to Qt6, the size of the project build for android has increased many times.项目从 Qt5 迁移到 Qt6 后,android 的项目构建规模增加了很多倍。 The main library (*.so) of the project began to occupy 700 MB instead of the previous 16 MB.项目的主库(*.so)开始占用 700 MB,而不是之前的 16 MB。

Maybe I need to specify some build parameters to get a size comparable to the previous one?也许我需要指定一些构建参数以获得与前一个相当的大小?

when build, there is such a message:构建时,有这样的消息:

> Task :stripDebugDebugSymbols
Unable to strip the following libraries, packaging them as they are: libMyApp_arm64-v8a.so, libQt6Core5Compat_arm64-v8a.so, …

it was necessary to notice these lines in the logs and install the specified NDK version.有必要注意日志中的这些行并安装指定的 NDK 版本。

C/C++: Because no explicit NDK was requested, the default version [21.4.7075529] for this Android Gradle Plugin will be used
C/C++: Folder D:\develop\AndroidSDK\ndk\21.4.7075529 does not exist. Ignoring.

In my case, this is ndk\21.4.7075529就我而言,这是ndk\21.4.7075529

The size of the apk has been reduced to 30 MB. apk 的大小已减少到 30 MB。 And before the problem was solved, it was more than 300 MB.在问题解决之前,它已经超过了 300 MB。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM