[flutter]안드로이드 버전코드, 버전이름 업그레이드 하기

 

이번에 Flutter로 앱을 출시해보려고 했는데, 안드로이드 버전코드, 버전네임을 업데이트 하는 방법에서 조금 헤메었다. 이번 포스팅에서는 그 내용을 다뤄보도록 할 것이다.

 

처음에 나는 local.properties에서 값을 바꿔야 한다고 생각해서 바꿔보았다. 그러나 build를 할 때 마다 값이 되돌아 오는 것이었다.

 

알고보니 pubspec.yaml에서 바꿔주어야 했다.

version: 1.0.1+2에서 1.0.1이 version name, 2가 version code가 되겠다.

pebspec.yaml 주석에도 내용이 잘 설명되어 있었다. ㅠ

 

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# 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.1+2

댓글



Designed by JB FACTORY