A Simple Fix for Big APKs

Ever noticed that your Flutter app's APK file is way too big? The simple flutter build apk command packs everything into one big file. This includes code for different types of phone processors, called ABIs. A user's phone only needs one of these, but it has to download the entire large file.

This is where the split-per-abi command comes in. You just add it to your usual build command:


  flutter build apk --split-per-abi.


 What this does is create a separate, smaller APK for each type of processor.


For example, you might get an APK just for arm64-v8a and another one for armeabi-v7a. Each file is much smaller because it only contains the code needed for that specific processor.

When you upload these smaller files to the Google Play Store, the store automatically sends the right version to each user's phone. This makes the download faster and saves a lot of data for your users.

You can find the new, smaller APKs in your project's 

build/app/outputs/apk/release/ 

folder. This command is a great way to make your app more efficient and user-friendly.


Source - Stackoverflow - https://stackoverflow.com/questions/49064969/flutter-apps-are-too-big-in-size

Comments