我有Xcode 6.2 Beta。尝试
xcrun simctl
最终产量
xrun:错误:无法找到实用程序“simctl”,不是开发工具或在PATH中
我有Xcode 6.2 Beta。尝试
xcrun simctl
最终产量
xrun:错误:无法找到实用程序“simctl”,不是开发工具或在PATH中
当前回答
以下是解决此问题的步骤-
open terminal on your mac type cd.. 2 times Now go to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs Now type ls, you will find sdk's here. Fir iPhone, you should see iPhoneOS.sdk. copy this path as /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk now reopen the terminal and type export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk now this error should be removed and your devices should be now recognised by system
其他回答
在Xcode中,打开顶部的Xcode菜单,然后选择Preferences…,然后选择Locations选项卡。
如果你对命令行“方法”感兴趣,请尝试:installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources。PKG -target /。另外,请确保Xcode -select -s选择了正确的Xcode安装路径。
选择Xcode首选项,然后选择位置选项卡,然后进入命令行工具下拉框,选择一个。
问题解决了!
仅供参考: 我在Xcode 12.3中尝试了这个方法
在首选项中添加xcode ->位置工作正常
以下是解决此问题的步骤-
open terminal on your mac type cd.. 2 times Now go to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs Now type ls, you will find sdk's here. Fir iPhone, you should see iPhoneOS.sdk. copy this path as /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk now reopen the terminal and type export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk now this error should be removed and your devices should be now recognised by system