更新日期:2021年 03月 09日iOS打包失败提示:'xcodebuild' requires Xcode
<p>
<span style="margin: 0px; padding: 0px; color: rgb(50, 50, 50); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" background-color:="" rgb(255,="" 255,="" 255);="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" heiti";font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;white-space:normal;orphans:2;widows:2;background-color:#ffffff;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><span style="margin: 0px; padding: 0px; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-style:="" normal;"="" font-size:14px;font-style:normal;"=""><span style="margin: 0px; padding: 0px; font-size: 14px;" font-size:14px;font-style:normal;"="">打包失败提示:</span><span style="margin: 0px; padding: 0px; font-size: 14px;" font-size:14px;font-style:normal;"=""> :"xcodebuild" requires Xcode</span></span></span><span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-size: 14px;" microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"="">,如下图</span>
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><br />
</span>
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><img alt="" src="http://data.tool.quicksdk.net/data/newFiles/image/20191219/20191219105749PmhL811.png" /></span>
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><br />
</span>
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><br />
</span>
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-size: 14px;" microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"="">解决:</span>
</p>
<p>
<br />
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-size: 14px;" microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"="">命令行执行xcode-select -p 查看xcode安装路径(结尾至少是xcode.app</span><span style="font-family:微软雅黑, " font-size:14px;letter-spacing:0pt;"=""></span><span style="font-size: 14px;" font-size:14px;letter-spacing:0pt;"="">),如果对应路径没有xcode,使用sudo xcode-select --switch (xcode_folder_path) </span><xcode_folder_path style="font-family:微软雅黑, " font-size:14px;letter-spacing:0pt;"=""><span style="font-size:14px;">修正xcode路径后重新打包(</span><span style="color:#E53333;font-size:14px;">注意</span><span style="white-space:normal;color:#E53333;font-size:14px;">sudo xcode-select后面有个空格</span><span style="font-size:14px;">)</span></xcode_folder_path>
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><br />
</span>
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><span style="font-size:14px;"> 提示:</span><span style="white-space:normal;font-size:14px;"> (</span><span style="white-space:normal;font-size:14px;">xcode_folder_path</span><span style="white-space:normal;"></span><span style="white-space:normal;font-size:14px;">)</span> <xcode_folder_path><xcode_folder_path><span style="font-size:14px;"> 表示xcode的实际路径,可以直接拖入到 switch后面,事例如下:</span></xcode_folder_path></xcode_folder_path></span>
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><xcode_folder_path><br />
</xcode_folder_path></span>
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><xcode_folder_path><img src="https://staticsite.quickapi.net/data/newFiles/20210309/20210309161207hifp506.png" alt="" /><br />
</xcode_folder_path></span>
</p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><xcode_folder_path>
<div>
<br />
</div>
</xcode_folder_path></span>
<p>
<br />
</p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><xcode_folder_path>
<div>
<br />
</div>
</xcode_folder_path></span>
<p>
<br />
</p>
<p>
<br />
</p>
<p>
<span style="background: none; margin: 0px; padding: 0px; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0pt; font-family: 微软雅黑, " microsoft="" yahei",="" arial,="" "apple="" ligothic="" medium",="" simhei,="" "st="" heiti";="" font-size:="" 14px;="" font-style:="" normal;="" font-weight:="" 400;="" word-spacing:="" 0px;="" white-space:="" orphans:="" 2;="" widows:="" font-variant-ligatures:="" font-variant-caps:="" -webkit-text-stroke-width:="" text-decoration-style:="" initial;="" text-decoration-color:="" initial;"="" hiragino="" sans="" gb",="" 冬青黑简体中文,="" sans-serif;font-size:14px;font-style:normal;font-weight:400;word-spacing:0px;vertical-align:baseline;white-space:pre;orphans:2;widows:2;font-variant-ligatures:normal;font-variant-caps:normal;-webkit-text-stroke-width:0px;text-decoration-style:initial;text-decoration-color:initial;"=""><br />
</span>
</p>