RN项目iOS端红色屏幕报错Unknown argument t
2020-11-18 本文已影响0人
稀释1
报错信息:
Unknown argument type 'attribute' in method -[RCTAppState getCurrentAppState:error:]. Extend RCTConvert to support this type
解决办法: 全局搜索RCTParseUnused这个词,然后修改这个函数的代码:
static BOOL RCTParseUnused(const char **input){
return RCTReadString(input, "__unused") ||
RCTReadString(input, "__attribute__((__unused__))") ||
RCTReadString(input, "__attribute__((unused))");
}
如果上边不行,再使用下面:
static BOOL RCTParseUnused(const char **input){
return RCTReadString(input, "__unused") ||
RCTReadString(input, "attribute((unused))") ||
RCTReadString(input, "attribute((unused))");
}