I get “xcrun: error: SDK ”iphonesimulator“ cannot

2020-08-12 03:54发布

问题:

I am trying to compile a Kivy program onto iOS, but when I run the command to build the Kivy distro I keep getting this error:

xcrun: error: SDK "iphonesimulator" cannot be located

I have xcode on my computer. What is going on?

回答1:

A bit late, but I had the same error experimenting with kivy and this helped me: Open in XCode Preferences, tab into Locations and take a look at your Command Line Tools selection. Mine was empty. When I changed it to the current used version suddenly the error was gone. I found this solution here (bottom): https://groups.google.com/forum/#!topic/rubymotion/Xw8gPcr2Fl8

If there is still something missing you can try to download an older IOS version to be sure there is something installed. Next to your appname you can select the device, click on it and select Download Simulations... and select the IOS you wish. I have done this step before the above, so I don't know if it's necessary.



回答2:

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/

reason: if you download the xcode more than one version . the path is not only one....



回答3:

It fixed for me once I downloaded the previous version of the simulator in my local.



标签: ios xcode kivy