Jai Techie
Jai Techie

Reputation: 1957

Flutter build split doesn't creating x86 apk?

Flutter doesn't create x86 apk but the other three apk's created.

Recently released Android application firebase crashes heads up with x86 couldn't find "libflutter.so". So I thought we have released a bundled app in that x86 lib folder or lib releated may not created so crash happened. And I tried to create a split apk in the local machine using flutter build apk --split-per-abi its created three files "arm64-v8a", "armeabi-v7a", "x86_64" but x86 apk not created I have no idea or any configuration I missed to do it?

Help me out. Thanks in advance!

maclap@root flutter-app-v3 % flutter build apk --split-per-abi

Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

Removed unused resources: Binary resource data reduced from 1109KB to 1052KB: Removed 5%
Removed unused resources: Binary resource data reduced from 1109KB to 1052KB: Removed 5%
Removed unused resources: Binary resource data reduced from 1109KB to 1052KB: Removed 5%
Running Gradle task 'assembleRelease'...                           68.0s
✓  Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (18.1MB).

In, android/app/build.gradle

defaultConfig {
    ...
    ndk {
        abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
    }
}

enter image description here

Upvotes: 5

Views: 4588

Answers (1)

Its_Murphy
Its_Murphy

Reputation: 61

flutter build apk --split-per-abi only generate three apk files source

1 - app-armeabi-v7a-release.apk (ARM 32-bit)
2 - app-arm64-v8a-release.apk (ARM 64-bit)
3 - app-x86_64-release.apk (x86 64-bit)

Flutter does not currently support building for x86 Android Source

Solution: You can run flutter build apk command to generate app-release.apk fat APK that is single APK runs on multiple architectures

Upvotes: 6

Related Questions