【发布时间】:2020-09-21 03:21:33
【问题描述】:
当我指定不同于通用标准的版本时,例如version: 0.x.x,它不会在构建后包含在应用程序版本信息中,并且在其他构建操作期间出现架构验证错误:
flutter --no-color pub get
Running "flutter pub get" in my_app...
Error on line 18, column 10 of pubspec.yaml: Invalid version number: Could not parse "0.x.x".
╷
18 │ version: 0.x.x
│ ^^^^^
╵
pub get failed (65; ╵)
我还收到以下工具提示:
Schema validation: String is violating the pattern: '^\d+\.\d+\.\d+(?:[+-]\S+)?$' 暗示了强制正则表达式格式,后面应该跟版本值。
如何更改 pubspec.yaml 验证架构以允许自定义格式的版本?
【问题讨论】:
标签: validation flutter yaml schema version