使用Cocospod安装RN的时候,报错
[!] Unable to satisfy the following requirements:
- `Yoga (= 0.44.0.React)` required by `React/Core (0.44.0)`
None of your spec sources contain a spec satisfying the dependency: `Yoga (= 0.44.0.React)`.
You have either:
* out-of-date source repos which you can update with `pod repo update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
分析可知React/core 依赖于Yoga所以咱应该使用pod添加Yoga,那么Yaga在什么目录下呢。
如果你已经使用nmp下载RN的Modules,你可以搜到Yoga的目录
安装依赖包yoga
path为上图中路径
pod 'Yoga', :path => ‘../node_modules/react-native/ReactCommon/yoga'