React/RCTConvert.h file not found with ReactNativeNavigation ver3

为君一笑 提交于 2021-01-28 06:31:37

问题


I'm bilding mobile app the following technologies.

react-native: v0.60.0
react-native-navigation: 3.0.0-alpha.2

And I build this app for iOS, then the following error message appears in the ReactNativeNavigation code.

React/RCTConvert.h file not found

The error file is Pods/Development Pods/ReactNativeNavigation/RNNOptions.h, and this is the content of it.

#import <UIKit/UIKit.h>
#import <React/RCTConvert.h>
#import "BoolParser.h"
#import "TextParser.h"
#import "NumberParser.h"
#import "DictionaryParser.h"
#import "ColorParser.h"
#import "ImageParser.h"
#import "IntNumberParser.h"
#import "DoubleParser.h"

@interface RNNOptions : NSObject

- (instancetype)initWithDict:(NSDictionary*)dict;

- (RNNOptions *)overrideOptions:(RNNOptions *)otherOptions;
- (RNNOptions *)mergeOptions:(RNNOptions *)otherOptions;
- (RNNOptions *)mergeInOptions:(RNNOptions *)otherOptions;

- (RNNOptions *)withDefault:(RNNOptions *)defaultOptions;

@end

I have already tried,

  • Following this tutorial

But it didn't work well, so I additionally tried these.

  • Insert pod 'ReactNativeNavigation', :path => '../node_modules/react-native-navigation' into ios/Podfile.
  • Run react-native link react-native-navigation and pod install in ios directory

  • Clean and rebuild the proejct in Xcode.


回答1:


with react native 0.60+ you don't need to link react native navigation manually.

simply run react-native link react-native-navigation and cd ios; pod install

for more information please see this issue



来源:https://stackoverflow.com/questions/57237624/react-rctconvert-h-file-not-found-with-reactnativenavigation-ver3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!