How could I make apk.exe shorter from my code in flutter. firstly I was creating apk.exe through -split-per-abi but now its not working thanks.
CodePudding user response:
Open Android Studio
From the menu > Build > Flutter > Build APK
Build APK running
Open your project folder then build>app>outputs>flutter-apk>app-release.apk
if there are any mistakes, give me a screenshot of this
CodePudding user response:
flutter run --release
: builds a release version of the app and starts it directly, then shows the console UI to manipulate the running instance.source flutter wiki
Use release mode for deploying the app, when you want maximum optimization and minimal footprint size. For mobile, release mode (which is not supported on the simulator or emulator), means that:
Assertions are disabled.
Debugging information is stripped out.
Debugging is disabled.
Compilation is optimized for fast startup, fast execution, and small package sizes.
Service extensions are disabled. (apps are smaller)
CodePudding user response:
Open terminal run this command
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
or
flutter build apk --split-per-abi