xcode CoreData:注释:无法加载优化模型(React Native)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/46463536/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
CoreData: annotation: Failed to load optimized model (React Native)
提问by Jan F.
I can not start my react native application anymore. I updated XCode yesterday, maybe it has to do with it?
我无法再启动我的 React Native 应用程序了。我昨天更新了 XCode,可能和它有关?
$ react-native run-ios
Found Xcode workspace xyz.xcworkspace
CoreData: annotation: Failed to load optimized model at path '/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsPackaging.framework/Versions/A/Resources
/XRPackageModel.momd/XRPackageModel 9.0.omo'
dyld: Symbol not found: _SimAudioHostUseSystemDefaultDeviceUID
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/../../Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit (which was built for Mac OS X 10.12)
Expected in: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
in /Applications/Xcode.app/Contents/Developer/usr/bin/../../Library/PrivateFrameworks/SimulatorKit.framework/Versions/A/SimulatorKit
采纳答案by Jan F.
I simply had to start XCode one time after the update and then I was asked if I want to install additional components. That's all.
更新后我只需要启动一次 XCode,然后我被问到是否要安装其他组件。就这样。
回答by togume
+1 on what @Jan mentioned. This happened to me after upgrading XCode to latest, and then running react-native run-ios
threw the same error. Booting up XCode prompted me to install additional components, and that resolved the issue.
+1 @Jan 提到的内容。在将 XCode 升级到最新版本后,这发生在我身上,然后运行react-native run-ios
抛出了同样的错误。启动 XCode 提示我安装其他组件,这解决了问题。
回答by Syed Azeem Ahmed
If you just updated your Xcode to Xcode 11.1 simply go to Xcode->preferences->Locations and change the command line tool to 11.0, this worked for me!
如果您刚刚将 Xcode 更新到 Xcode 11.1,只需转到 Xcode->preferences->Locations 并将命令行工具更改为 11.0,这对我有用!
回答by celwell
Couldn't figure it out, but I realized that running from Xcode directly works.
想不通,但我意识到从 Xcode 运行可以直接工作。
回答by Bill Wplay
It happened to me to today, and I search for a lot but all failed, finally I find someone says that, if your Xcode is on version 9.x, sth will run wrong on higher version react-native-cli, maybe you can choose react-native-cli @version 0.44.x or below. If I am wrong, sorry
到今天就发生在我身上,找了很多都失败了,最后发现有人说,如果你的Xcode是9.x版本,在更高版本的react-native-cli上会出错,也许你可以选择 react-native-cli @version 0.44.x 或更低版本。如果我错了,对不起
回答by smooth_smoothie
I was running XCode v9.2 and I was getting this error. Basically Then I had to Upgrade to Mac 10.13.2 (Sierra to High Sierra) and then download XCode v9.4. When I opened XCode 9.4 for the first time I was asked to download the components that everyone is talking about. I no longer had the error.
我正在运行 XCode v9.2,但出现此错误。基本上然后我不得不升级到 Mac 10.13.2(Sierra 到 High Sierra)然后下载 XCode v9.4。当我第一次打开 XCode 9.4 时,我被要求下载每个人都在谈论的组件。我不再有错误。