Flutter中使用Fastlane上传App Store时遇版本号格式错误求助
问题描述
在使用Flutter结合Fastlane上传构建包至App Store时,完成登录并通过App Store ID选择团队后,触发以下错误:
/Users/mac/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/version.rb:214:in `initialize': Malformed version number string undefined (ArgumentError)
解决方案
- 更新Fastlane到兼容Ruby 3.0.0的版本,执行命令:
bundle update fastlane - 降级Ruby版本至2.7.x系列(部分旧版Fastlane对Ruby 3.x兼容较差),通过rvm执行:
rvm install 2.7.6 && rvm use 2.7.6 - 清理本地gem缓存并重新安装依赖:
gem cleanup && bundle install - 检查Fastlane配置文件(Fastfile),确认所有涉及版本号的变量都已正确定义,避免出现
undefined这类无效的版本字符串。
内容的提问来源于stack exchange,提问作者Renik Shiroya
相关产品推荐
相关产品推荐

