1.安装Xcode命令行工具
终端执行xcode-select --install
,如果没有安装,会弹出对话框,提示安装。
如果提示
xcode-select: error: command line tools are already installed, use "Software Update" to install updates,表示已经安装过了;
2.安装fastlane
命令行执行:sudo gem install fastlane -NV
或是brew cask install fastlane
安装完了执行fastlane --version
,确认下是否安装完成和当前使用的版本号。
安装完成!!!
注意⚠️:
我在安装fastlane的时候一直出现这个问题
ERROR: Error installing fastlane:ERROR: Failed to build gem native extension. Building has failed. See above outputformore information on the failure.extconf failed,exitcode 1Gem files will remain installedin/Library/Ruby/Gems/2.3.0/gems/unf_ext-0.0.7.6forinspection.Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/unf_ext-0.0.7.6/gem_make.out
经过百度查找资料应该是系统的原因,更新到最新的版本(10.15.1 )(等待呀。。。。。。)
系统更新之后直接终端执行步骤2就可以啦。