找到myproject/node_modules/react-native/React/Base/RCTModuleMethod.mm. 【或者(.m)】文件
修改static BOOL RCTParseUnused 方法如下:
static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, “unused”) ||
RCTReadString(input, “__attribute((unused))”) ||
RCTReadString(input, “attribute((unused))”);
}
重新编译