My app uses Firebase and Flutter (auth, cloud_firestore, google_sign_in...).
And when I upload it to Play Store with App Bundle using this command:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
My app does not work properly with Firebase, there are no logs and crash reports.
But when I use APK it works.
So I released several APK files using this command: flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi, my question is is it possible to upload those 3 files to the same app on Play Store?
It gives me a warning too:
Unoptimized APK
Warning:
This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimizing your app for device configurations, your app is larger to download and install on users' devices than it needs to be. Larger apps see lower install success rates and take up storage on users' devices.
Resolution:
Use the Android App Bundle to automatically optimize for device configurations, or manage it yourself with multiple APKs.
What should I do? (I prefer to use APK because my app works with APK)
packages:
google_sign_in: 4.5.1
firebase_auth: 0.16.1
firebase_core: ^0.4.0+8
firebase_analytics: ^5.0.14
cloud_firestore: ^0.13.6
app/build.gradle (android->defaultConfig) I commented the NDK section because APK doesn't allow with it.
defaultConfig {
applicationId "XXXXXX"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
// ndk {
// abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
// }
}
...
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
multiDexEnabled true
}
}