(一)安裝react-native-fs庫(kù)時(shí),執(zhí)行react-native link react-native-fs
命令捐祠,出現(xiàn)錯(cuò)誤:
ERR! Something went wrong while linking.
Error: Expected "/*" or ";" but "\"" found.
Please file an issue here: https://github.com/facebook/react-native/issues
link失敗碱鳞,導(dǎo)致Xcode打不開。
解決辦法:
參考"react-native link" error踱蛀,打開xxx.xcodeproj下的project.pbxproj文件窿给,找到HEADER_SEARCH_PATHS,將
HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../react-native/React/**","$(SRCROOT)/../node_modules/react-native-device-info/RNDeviceInfo";
改為
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/../../../react-native/React/**,
"$(SRCROOT)/../node_modules/react-native-device-info/RNDeviceInfo",
);
之后執(zhí)行react-native link react-native-fs
命令率拒,link成功崩泡!