Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This was my solution:
- in app gradle
- splits {
- // Configures multiple APKs based on ABI.
- abi {
- // Enables building multiple APKs per ABI.
- enable true
- // By default all ABIs are included, so use reset() and include to specify that we only
- // want APKs for armeabi-v7a and arm64-v8a.
- // Resets the list of ABIs that Gradle should create APKs for to none.
- reset()
- // Specifies a list of ABIs that Gradle should create APKs for.
- include "armeabi-v7a", "arm64-v8a"
- // Specifies that we do not want to also generate a universal APK that includes all ABIs.
- universalApk false
- }
- }
- 2. run flutter build apk --release --target-platform=android-arm
- 3. upload app-armeabi-v7a-release.apk to the play store
- 4. increment versionCode
- 5. run flutter build apk --release --target-platform=android-arm64
- 6. upload app-arm64-v8a-release.apk to the play store
- Google play store will serve App according to device architecture. 32bit devices are happy, 64bit devices are happy and I'm happy knowing that my APK size remains relatively small while still serving both architectures.
- If we include support for both architectures in the same APK, expect the size of your app to be 10MB+
- /// ALTERNATE
- flutter build apk --target-platform android-arm,android-arm64 --split-per-abi
- /// TO BUILD BUNDLE
- flutter build appbundle --release --target-platform=android-arm64
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement