【问题标题】:Flutter lib size and assets size too bigFlutter 库大小和资产大小太大
【发布时间】:2021-08-13 04:34:26
【问题描述】:

我无法理解为什么我的库这么大。 即使 assets 文件夹显示为 35MB,但存储在 assets 文件夹中的图像只有 500KB,我无法找到导致应用程序大小变大的问题。

▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
app-release.aab (total compressed)                                        122 MB
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  BUNDLE-METADATA/
    com.android.tools.build.libraries                                       7 KB
    com.android.tools.build.obfuscation                                   545 KB
  base/
    root                                                                   48 KB
    lib                                                                    81 MB
    Dart AOT symbols accounted decompressed size                            7 MB
      package:flutter                                                       3 MB
      package:syncfusion_flutter_calendar                                 762 KB
      dart:convert                                                        569 KB
      dart:core                                                           395 KB
      package:syncfusion_flutter_datepicker                               296 KB
      dart:typed_data                                                     254 KB
      dart:ui                                                             225 KB
      dart:collection                                                     148 KB
      dart:io                                                             142 KB
      dart:async                                                          121 KB
      package:stupad                                                      112 KB
      package:syncfusion_flutter_core                                      78 KB
      package:intl                                                         67 KB
      package:win32                                                        52 KB
      package:vector_math                                                  52 KB
      package:flutter_staggered_grid_view                                  45 KB
      dart:isolate                                                         38 KB
      package:characters                                                   32 KB
      package:flutter_local_notifications                                  30 KB
      package:google_mobile_ads                                            28 KB
    res                                                                   500 KB
    assets                                                                 35 MB
    dex                                                                     4 MB
    manifest                                                                5 KB
    resources.pb                                                           84 KB
  META-INF/
    KEY.SF                                                                 12 KB
    KEY.RSA                                                                 1 KB
    MANIFEST.MF                                                            11 KB

pubspec.yaml

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  google_mobile_ads:
  google_ml_kit: ^0.3.0
  syncfusion_flutter_calendar: ^19.1.59
  shared_preferences: ^2.0.5
  provider: ^5.0.0
  flutter_staggered_grid_view: ^0.4.0
  firebase_core: ^1.1.0
  image_picker: ^0.7.4
  flutter_local_notifications: ^5.0.0+4
  flutter_native_timezone: ^1.0.10

【问题讨论】:

  • 请您发布您的 pubspec.yaml 文件
  • 我已经添加了 pubspec.yaml

标签: android flutter dart flutter2.0


【解决方案1】:

运行:flutter clean 之后:再次构建
现在你看到了一个奇迹

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-16
    • 2012-07-19
    相关资源
    最近更新 更多