赞
踩
在原生Android原生开发中我们用versionName、versionCode代表版本号和版本code,那么我们在flutter项目中,如何配置这两个值呢?
通过修改pubspec.yaml文件中的version属性即可,下面1.0.0+1中用“+”号分割:
versionName | versionCode |
---|---|
1.0.0 | 1 |
1.0.0代表Android中的versionName,1代表versionCode,根据实际需要相应修改即可,例如:
versionName是2.0.0,versionCode是2,则修 version修改为2.0.0+2即可
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html version: 1.0.0+1 environment: sdk: ">=2.17.3 <3.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions # consider running `flutter pub upgrade --major-versions`. Alternatively, # dependencies can be manually updated by changing the version numbers below to # the latest version available on pub.dev. To see which dependencies have newer # versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。