在执行了一个将字体资产链接到我的package.json中的react本机链接之后:
"rnpm": {
"assets": ["./assets/fonts/"]
}当我试图运行react本机运行-ios时,xcode中出现了几个错误:
类“RCTBridge”的重复接口定义

如果你们有任何线索的话,这似乎是包含文件的问题。
Thx
发布于 2018-08-13 07:04:38
我也有同样的问题。
在我的例子中,这个问题发生在添加反应-本机结构库之后。
所以我要按照步骤做。
1)打开SMXAnvors.h,然后将#import "RCTBridgeModule.h"更改为
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif2)打开SMXAnvors.m,然后更改如下
#import "RCTBridgeModule.h"
#import "RCTEventDispatcher.h"
#import "RCTBridge.h"至
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif
#if __has_include(<React/RCTBridge.h>)
#import <React/RCTBridge.h>
#else
#import "RCTBridge.h"
#endif
#if __has_include(<React/RCTEventDispatcher.h>)
#import <React/RCTEventDispatcher.h>
#else
#import "RCTEventDispatcher.h"
#endif这也许能解决你的问题。
这个解决方案对我有用。
https://stackoverflow.com/questions/50359579
复制相似问题