fastlane 问题记录

这篇博客记录了在配置和使用fastlane过程中遇到的挑战,包括错误提示和解决方案。作者建议通过创建Gemfile来更好地管理和使用fastlane,以遵循官方文档的指导。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Q: 在Jenkins 中执行fastlane 命令时,会报如下错误

[15:29:13]: [33mGet started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile[0mLooking for related GitHub issues on fastlane/fastlane...

经测试发现可以在execute shell 中加入如下代码:
export LANG="en_US.UTF-8"

Q: /Users/Shared/Jenkins/tmp/jenkins3974391514400956020.sh: line 3: fastlane: command not found

确保Jenkins用户那边是否安装了faselane ,如果没有安装则需要安装ruby 、rvm 、fastlane


Q: fastlane error
+ fastlane -v/Users/Shared/Jenkins/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem fastlane (>= 0.a) (Gem::GemNotFoundException)from /Users/Shared/Jenkins/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems.rb:299:in `activate_bin_path'from /Users/Shared/Jenkins/.rvm/rubies/ruby-2.4.0/bin/fastlane:23:in `<main>'from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'from /Users/Shared/Jenkins/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'Build step 'Execute shell' marked build as failure

需要更新或下载fastlane 版本

Q: 怎么删除fastlane 指定版本?
gem uninstall fastlane --version=2.55.0
ERROR: While executing gem ... (Gem::InstallError)
fastlane is not installed in GEM_HOME, try:
gem uninstall -i /Users/weihuang/.rvm/gems/ruby-2.4.0@global fastlane
weideMac-mini:~ weihuang$ gem uninstall -i /Users/weihuang/.rvm/gems/ruby-2.4.0@global fastlane --version=2.55.0
Successfully uninstalled fastlane-2.55.0

Q: 怎么更新fastlane ?
执行 fastlane update_fastlane

Q: jenkins 怎么配置fastlane ?
在execute shell 中加入以下语句:
#!/usr/bin/env bash
source ~/.bash_profile
export LANG="en_US.UTF-8"

Q: fastlane 怎么添加登录iTunes connect 凭证?
fastlane fastlane-credentials add --username xxx@xxx. (appid)
Password: **********
Credential Midastouchinnovationllc@gmail.com:************ added to keychain.

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值