I want to generate apk file that support : 'armeabi-v7a','arm64-v8a','x86','x86_64'
I used the command :
flutter build apk --flavor production
and also
flutter build appbundle --target-platform android-arm,android-arm64
The result will always be only arm64-v8a, and armeabi-v7a
I tried to change defaultConfig in android/build.gradle
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "XXX"
minSdkVersion 16
targetSdkVersion 28
versionCode VERSION_CODE
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [AppLabelName: "XXX"]
multiDexEnabled true
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
}`
then run
flutter build apk --flavor production
still didn't work, When I tried to test it on
ASUS T00P • EAAZCY03U504 • android-arm • Android 4.4.2 (API 19)
it always show error
Performing Push Install
build\app\outputs\apk\production\release\app-production-release.apk: 1 file pushed. 3.5 MB/s (33320272 bytes in 9.085s)
pkg: /data/local/tmp/app-production-release.apk
Failure [INSTALL_FAILED_MEDIA_UNAVAILABLE]