Unable to upload APK on play console getting (Upload a valid app bundle) issue - flutter

Dhi*_*rma 18 android dart react-native flutter

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
Run Code Online (Sandbox Code Playgroud)

below is issue screenshot 在此输入图像描述

Sni*_*fer 15

Google Play 商店不再接受 APK 来发布应用程序,您必须上传Android 应用程序包。

以供参考

对于本机 Android
Android Studio-> 构建-> 生成签名包/APK...

在此输入图像描述

对于 Flutter 请参阅开发文档

From the command line:

Enter cd [project]
Run flutter build appbundle
(Running flutter build defaults to a release build.)
Run Code Online (Sandbox Code Playgroud)


Shi*_*vam 12

您正在 Google Play Console 中上传.apk文件,但必须上传.aabApp Bundle 文件。


Dhi*_*rma 4

我不知道谷歌从 2021 年 8 月起停止接受新应用程序的 APK,仅供参考,请访问 -参考

flutter build appbundle --no-tree-shake-icons --dart-define=ID=1234 --dart-define=APP_NAME=test_app --dart-define=APP_SUFFIX=.test
Run Code Online (Sandbox Code Playgroud)

这对我有用