zoukankan      html  css  js  c++  java
  • Flutter

    前两天提交了一个版本Google Play,结果今天收到拒绝的邮件,说App内购有问题。

    于是把设置里面的支付宝和微信打赏功能关闭,又打了一个aab。

    然后上传到Google Play,结果提示

    You need to use a different version code for your APK or Android App Bundle because you already have one with version code 1.

    一开始尝试修改App内部的版本号,就在pubspec.yaml中。

    修改为,最开始是1.0.0

    version: 1.0.1

    还是不行,提示同样的错误。

    Google了一下,结果方法很简单,在刚才的pubspec.yaml中,

    版本号加一个+1即可。因为第一次上传的Version Code是1。这个在Play Console中可以看见。

    version: 1.0.0+2

    然后就可以上传了。

    StackOverflow解释

    For Android:

    A.B.C represents the versionName such as 1.0.0.

    X (the number after the +) represents the versionCode such as 123, etc.

    When you run flutter packages get after updating this version in the pubspec file, the versionName and versionCode in local.properties are updated which are later picked up in the build.gradle (app) when you build your flutter project using flutter build or flutter run which is ultimately responsible for setting the versionName and versionCode for the apk.

    For iOS:

    A.B.C represents the CFBundleShortVersionString such as 1.0.0.

    X (the number after the +) represents the CFBundleVersion such as 123, etc.

    参考: 

    Flutter: upgrade the version code for play store

  • 相关阅读:
    怎么使用git来管理项目版本?
    《我的四季》 张浩
    [代码片段]读取BMP文件(二)
    [代码片段]读取BMP文件
    《构建之法》阅读笔记02
    二维数组
    学习进度二
    《构建之法》阅读笔记01
    数组
    软件工程第一周开课博客
  • 原文地址:https://www.cnblogs.com/hupo376787/p/11988790.html
Copyright © 2011-2022 走看看