【问题标题】:version code not changing of APK or Android App Bundle in the flutter. Even after changing it from pubspec.yamlAPK 或 Android App Bundle 的版本代码不会在 Flutter 中更改。即使从 pubspec.yaml 更改它
【发布时间】:2021-04-03 10:42:26
【问题描述】:

版本代码不变

在我的 appBundle 版本中,即使更改了pubspec.yaml 中的代码,代码也没有改变

version: 1.0.0+4

但在 google playstore 中上传应用时显示相同的错误。

现在该做什么。我可以从build.gradle->中的android文件中更改版本代码。

defaultConfig {
    ...
    ....
    versionCode 4
    versionName flutterVersionName
    ....
}

但我想从pubspec.yaml 更改它。

【问题讨论】:

  • 在构建 appbundle 之前尝试使用 flutter clean 命令。
  • @DIVYANSHUSAHU,在 android 模块 android>local.properties 上更新版本代码和名称也将解决问题
  • @ॐRakeshKumar 我在我的问题中写到我知道那种方法。
  • @DIVYANSHUSAHU,你在哪里写的?(在你的问题中)
  • android>local.properties的意思是修改local.properties中的版本号吧。但我已经在 defaultConfig 中进行了更改,它从 local.properties 获取版本代码。

标签: android flutter google-play-services flutter-dependencies flutter-release


【解决方案1】:

在构建 apk 时尝试添加 --build-name=1.0.0 --build-number=1

例如:flutter build apk --split-per-abi --build-name=1.0.0 --build-number=1

【讨论】:

  • 还是不行。它仍然只构建以前的版本。
猜你喜欢
  • 2019-10-17
  • 1970-01-01
  • 2021-07-24
  • 1970-01-01
  • 2021-03-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-05-22
相关资源
最近更新 更多