当 运行 命令 fastlane init 时,fastlane 永远卡住

Fastlane stuck forever when run command fastlane init

我正在使用 fastlane 和 xcode 9 并且 我遇到了 fastlane (2.95.0) 的问题。当我 运行 命令 fastlane init 时,它显示了 4 个可供选择的选项。然后我选择了选项 4,但它永远卡住了。如何解决这个问题?

这个问题在我的机器上也出现过一次。问题出在默认 Ruby 环境中。您可以 "gem cleanup" 试试看是否可以加快速度吗?

此外,如果这不起作用,您可以尝试以下命令吗-

gem cleanup
gem update -p
rvm reinstall ruby-2.5.1 --with-openssl-dir=/usr/local
gem install fastlane --verbose

使用sudo fastlane init。 这解决了我的问题

https://github.com/fastlane/fastlane/issues/12500

其他选项只是将 fastlane 移动到用户的文件夹并使其在没有 sudo 的情况下工作:

https://www.michaelehead.com/2016/02/06/installing-gems-without-sudo.html

之后,卸载所有以前安装的 fastlane(可以同时从 brew installsudo gem install 卸载)并使用 gem install fastlane -NV 重新安装 fastlane,不使用 sudo。