flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
935 stars 715 forks source link

Use google_rlkit_translation, the Android package size has increased by 30MB #656

Closed hhzhangzy closed 1 month ago

hhzhangzy commented 1 month ago

Hi, When using google_rlkit_translation plugin for Android engineering and Flutter build apk, I found that the package size increased by about 30MB. Is there any optimization plan?

flutter doctor Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.13.2, on Microsoft Windows [版本 10.0.22631.3880], locale zh-CN) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [X] Visual Studio - develop Windows apps X Visual Studio not installed; this is necessary to develop Windows apps. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [√] Android Studio (version 2022.2) [√] Android Studio (version 2023.2) [√] Connected device (4 available) [√] Network resources

! Doctor found issues in 1 category.

fbernaly commented 1 month ago

Look at this: https://developers.google.com/ml-kit/tips/reduce-app-size

And some similar issues: https://github.com/flutter-ml/google_ml_kit_flutter/labels/App%20size

hhzhangzy commented 1 month ago

Look at this: https://developers.google.com/ml-kit/tips/reduce-app-size

And some similar issues: App size Issues related to increased app size by models

There is no precise expression on this link(https://developers.google.com/ml-kit/tips/reduce-app-size). The integration of google_mlkit_translation plugin into the project has already increased the project by 30MB, not to mention other google_mlkit_xxxx plugins. If we want to remove unnecessary language models, how should we remove them? Do you have any specific documents?