title: Reduce flutter apk size
body: <p>Can anyone tell me how do I reduce this apk size?<br />
  Some major contributors are classes.dex(3MB), Dart AOT symbols(6MB) and audience_network.dex(1MB).<br />
  The same applicative using native android can be built in just 4-5MB</p>
  <p>Here are the results of --analyze-size.</p>
  <p>C:\Users\arunc\AndroidStudioProjects\bonaza&gt;flutter build apk --target-platform android-arm64 --release --analyze-size<br />
  Running &quot;flutter pub get&quot; in miband5...                          1,807ms <br />
  Building without sound null safety<br />
  For more information see <a href="https://dart.dev/null-safety/unsound-null-safety%5C" rel="nofollow noreferrer">https://dart.dev/null-safety/unsound-null-safety\</a>
  Note: Some input files use or override a deprecated API.<br />
  Note: Recompile with -Xlint:deprecation for details.<br />
  Note: Some input files use or override a deprecated API.<br />
  Note: Recompile with -Xlint:deprecation for details.<br />
  Note: Some input files use unchecked or unsafe operations.<br />
  Note: Recompile with -Xlint:unchecked for details.<br />
  Note: C:\src\flutter\flutter.pub-cache\hosted\pub.dartlang.org\permission_handler-5.0.1+1\android\src\main\java\com\baseflow\permissionhandler\PermissionHandlerPlugin.java u
  ses or overrides a deprecated API.<br />
  Note: Recompile with -Xlint:deprecation for details.<br />
  Running Gradle task 'assembleRelease'...<br />
  Running Gradle task 'assembleRelease'... Done                     124.9s<br />
  √ Built build\app\outputs\flutter-apk\app-release.apk (12.5MB).
  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒<br />
  app-release.apk (total compressed)                                         13 MB
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</p>
  <p>res/</p>
  <pre><code>drawable-anydpi-v21                                                     8 KB
  interpolator                                                            1 KB
  drawable-xxhdpi-v4                                                     56 KB
  drawable-hdpi-v4                                                       33 KB
  drawable                                                               21 KB
  drawable-anydpi-v24                                                     2 KB
  drawable-mdpi-v4                                                       24 KB
  color-v23                                                               2 KB
  drawable-xhdpi-v4                                                      40 KB
  drawable-ldpi-v4                                                        6 KB
  color                                                                   5 KB
  mipmap-hdpi-v4                                                         19 KB
  layout                                                                 28 KB
  anim                                                                    8 KB
  drawable-xxxhdpi-v4                                                    48 KB
  mipmap-xxxhdpi-v4                                                      88 KB
  mipmap-xhdpi-v4                                                        29 KB
  mipmap-xxhdpi-v4                                                       55 KB
  drawable-ldrtl-xxxhdpi-v17                                              2 KB
  mipmap-mdpi-v4                                                         10 KB
  drawable-v21                                                            2 KB
  drawable-ldrtl-xhdpi-v17                                                1 KB
  drawable-ldrtl-xxhdpi-v17                                               1 KB
  layout-watch-v20                                                      1022 B
  layout-v21                                                              2 KB
  </code></pre>
  <p>META-INF/</p>
  <pre><code>CERT.SF                                                                36 KB
  kotlin-stdlib.kotlin_module                                             1 KB
  MANIFEST.MF                                                            32 KB
  CERT.RSA                                                                1 KB
  </code></pre>
  <p>assets/</p>
  <pre><code>flutter_assets                                                         69 KB
  audience_network.dex                                                    1 MB
  </code></pre>
  <p>kotlin/</p>
  <pre><code>kotlin.kotlin_builtins                                                  4 KB
  reflect                                                                 2 KB
  collections                                                             1 KB
  </code></pre>
  <p>AndroidManifest.xml                                                       6 KB</p>
  <p>classes.dex                                                               3 MB</p>
  <p>resources.arsc                                                          664 KB</p>
  <p>lib/</p>
  <pre><code>arm64-v8a                                                               6 MB
  Dart AOT symbols accounted decompressed size                            6 MB
    package:flutter                                                       3 MB
    dart:core                                                           405 KB
    dart:typed_data                                                     273 KB
    dart:io                                                             253 KB
    dart:ui                                                             215 KB
    dart:async                                                          173 KB
    dart:collection                                                     165 KB
    package:miband5                                                     152 KB
    package:parse_server_sdk                                            122 KB
    package:flutter_gen                                                 122 KB
    package:flutter_localizations                                       106 KB
    package:flutter_cache_manager                                       102 KB
    dart:convert                                                         83 KB
    package:sqflite_common                                               73 KB
    package:source_span                                                  63 KB
    package:win32                                                        53 KB
    package:intl                                                         50 KB
    dart:isolate                                                         39 KB
    package:vector_math                                                  34 KB
    package:google_mobile_ads                                            29 KB
  </code></pre>
  <p>▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  A summary of your APK analysis can be found at: C:\Users\arunc.flutter-devtools\apk-code-size-analysis_09.json</p>