美文网首页
xcrun: error: SDK "iphoneos" can

xcrun: error: SDK "iphoneos" can

作者: 一个魔法师 | 来源:发表于2021-02-28 16:54 被阅读0次

大概率是xcode 路径问题
通过执行如下命令来解决:

  1. $: xcrun --sdk iphoneos --show-sdk-path

    error:"unable to lookup item 'Path' in SDK 'iphoneos'"
    
  2. $ xcode-select --print-path

    /Library/Developer/CommandLineTools
    
  3. $ xcodebuild -showsdks

    error:tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    
  4. $ sudo xcode-select --switch

     /Applications/Xcode.app/Contents/Developer/
    
  5. $ xcrun --sdk iphoneos --show-sdk-path (成功)

相关文章

网友评论

      本文标题:xcrun: error: SDK "iphoneos" can

      本文链接:https://www.haomeiwen.com/subject/wfggfltx.html