Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. This was my solution:
  2.  
  3. in app gradle
  4. splits {
  5. // Configures multiple APKs based on ABI.
  6. abi {
  7. // Enables building multiple APKs per ABI.
  8. enable true
  9. // By default all ABIs are included, so use reset() and include to specify that we only
  10. // want APKs for armeabi-v7a and arm64-v8a.
  11.  
  12. // Resets the list of ABIs that Gradle should create APKs for to none.
  13. reset()
  14.  
  15. // Specifies a list of ABIs that Gradle should create APKs for.
  16. include "armeabi-v7a", "arm64-v8a"
  17.  
  18. // Specifies that we do not want to also generate a universal APK that includes all ABIs.
  19. universalApk false
  20. }
  21. }
  22.  
  23.  
  24.  
  25. 2. run flutter build apk --release --target-platform=android-arm
  26.  
  27. 3. upload app-armeabi-v7a-release.apk to the play store
  28.  
  29. 4. increment versionCode
  30.  
  31. 5. run flutter build apk --release --target-platform=android-arm64
  32.  
  33. 6. upload app-arm64-v8a-release.apk to the play store
  34.  
  35. 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.
  36.  
  37. If we include support for both architectures in the same APK, expect the size of your app to be 10MB+
  38.  
  39.  
  40.  
  41.  
  42. /// ALTERNATE
  43.  
  44.  
  45. flutter build apk --target-platform android-arm,android-arm64 --split-per-abi
  46.  
  47. /// TO BUILD BUNDLE
  48.  
  49. flutter build appbundle --release --target-platform=android-arm64
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement