Xcode從12.4升級(jí)到12.5夯尽,運(yùn)行項(xiàng)目報(bào)錯(cuò)
1、報(bào)錯(cuò)1
/Users/singcloud/Desktop/ReactNative/xx/xxx/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:311:34: Cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an rvalue of type 'NSArray<Class> *'
2爱态、報(bào)錯(cuò)2
/Users/singcloud/Desktop/ReactNative/xx/xxx/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:751:79: Cannot initialize a parameter of type 'NSArray<Class> *' with an lvalue of type 'NSArray<id<RCTBridgeModule>> *__strong'
3螺戳、報(bào)錯(cuò)3
/Users/singcloud/Desktop/ReactNative/xx/xxx/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:802:69: Cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an lvalue of type 'NSArray<Class> *__strong'
解決方法:
將_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules替換為_(kāi)initializeModules:(NSArray<Class> *)modules
參考:https://github.com/facebook/react-native/issues/28405#issuecomment-827424477