ReactNative - unable to find utility "instruments", not a developer tool or in PATH

When I enter the command code sudo react-native run-ios in the terminal to run the ReactNative project, I get an error:

unable to find utility "instruments", not a developer tool or in PATH

I was thinking that it was fine two days ago, why is it not working now? ? ? After searching, I found out that it is because I have installed xcode 9 in the past two days. My computer has both xcode8 and xcode9, so this command cannot start a certain version of the simulator, so first execute the following search and set command code:

sudo xcode-select -s /Applications/Xcode8.3.app/Contents/Developer/

Among them, Xcode8.3.app, you can replace the installation names of multiple xcodes on your computer.


Then start the run command again sudo react-native run-ios

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325570473&siteId=291194637