如題,直接說緣由: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