如题,直接说缘由:android
flutter run --release命令打的包不行,必需要经过build apk(flutter build apk命令)的方式来app
后面android打包都用build apk的命令来打包,这个命令打出的包会大一些,由于包含了更多的支持的cpu abi指令集,能适配更多的手机。
用flutter run --release命令打出来的包只是针对你当前插入的手机来执行的包,体积要小不少。
因此之后都用flutter build apk命令或者android里面的菜单:
ide
这种方式打包。ui
执行打包命令后,提示:url
Running "flutter pub get" in newsinenglish... 1.2s
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Running Gradle task 'assembleRelease'...
spa
细看上面的绿色显示的命令,其实仍是有不少方式去执行打包的。.net