APK Analyzer
This skill equips you to thoroughly examine built APK files to catch bloat and security issues.
Instructions
- After running
flutter build apk --release, locate the generated APK (usually inbuild/app/outputs/flutter-apk/app-release.apk). - Use the Android
apkanalyzerCLI tool (if available in the environment) to inspect the APK. - Check the APK size. If the size jumped significantly compared to previous builds, drill down into
lib/andres/sizes. - Dump the
AndroidManifest.xmlfrom the APK to verify that no unwanted or dangerous permissions were accidentally injected by third-party Flutter plugins. - If you find excessive DEX methods or unused resources, recommend ProGuard/R8 optimizations in
app/build.gradle.
When to use
- Right before finalizing a major release to ensure the binary is lean and secure.
- When debugging issues where third-party packages silently declare unwanted Android permissions.
- When investigating slow app startup times.