Unable to upload APK on play console getting (Upload a valid app bundle) issue - flutter
Solution 1
I was not aware of google is stop accepting APK's for new app from august 2021 for reference please visit - reference
flutter build appbundle --no-tree-shake-icons --dart-define=ID=1234 --dart-define=APP_NAME=test_app --dart-define=APP_SUFFIX=.test
this worked for me
Solution 2
You are uploading a .apk
file in Google Play Console but you have to upload the .aab
App Bundle file.
Solution 3
Google Play store simply does not accepts APK anymore for publishing the apps, you have to upload the bundle of the Android app.
For reference
For Native Android
Android Studio-> Build-> Generate Signed Bundle /APK...
For Flutter See this and dev doc
From the command line:
Enter cd [project]
Run flutter build appbundle
(Running flutter build defaults to a release build.)
Dhiroo Verma
Updated on December 31, 2022Comments
-
Dhiroo Verma over 1 year
I am getting an error while uploading apk to play console for first time. I have released 2 apps with same account and did not get any error, but this is the 3rd app and it is working fine on each mode (--release, --debug, --profile). I am building apk in flutter using --dart-define using the following command
flutter build apk --release --split-per-abi --no-tree-shake-icons --dart-define=ID=1234 --dart-define=APP_NAME=test_app --dart-define=APP_SUFFIX=.test
-
Dhiroo Verma over 2 yearsYour answer is right but for building flutter app with --dart-define need different command
-
Sniffer over 2 yearsI mentioned
flutter build appbundle
in answer please check and also attach the link for