hms-flutter-plugin
hms-flutter-plugin copied to clipboard
Library size is too big (350+ MB)
Description After adding library into dependencies, app size increased from 68 to 424 MB.
How we can reduce app size?
Can I confirm what Kit plugins you have integrated? And how do you configure it?
We use https://pub.dev/packages/huawei_ml_image. I added this plugin to dependencies.
More specifically we use: huawei_ml_image: ^3.2.0+301 version. And the huawei library size is not 350 but around 100MB. 250 it's google ML Kit which is also too big.
ML has multiple plugins, you can select the ML plug-ins based on the actual scenario. For details, you could refer to this docs.
As I mentioned above, we use the following pluginL: huawei_ml_image. For setting up the plugin we used the documentation you provided: docs. Currently huawei_ml_image package reserves 100 mb storage. Is it possible to reduce it? 100 MB it's too big size, so we can't publish an app because of it.
In this case, you are advised to tailor dependencies in huawei_ml_image-3.2.0+301\android\build.gradle
by referring to the API. After the tailoring is complete, modify the corresponding code.
Could you please clarify what do you mean? In build/huawei_ml_image I don't see android folder
huawei_ml_image-*.*\android\build.gradle
In local package repositories, like following:
how to reduce if I just use huawei_location?