React Native中 在使用List
和Radio
元件時,報了這個醒目的錯誤:Unrecognized font family ‘antoutline’
百度和Google都沒找到答案,後來去antd rn
的官方github下的Issues下才找到解決方案。
方法總結如下:
方法一:
antfill.ttf
和 antoutline.ttf
到 Xcode Project -> Resources folder
.info.plist
->Fonts provided by application
配置中。方法二:
運行react-native link @ant-design/icons-react-native
應該可以正常的解決這個問題,如果不行你應該檢視為什麼這個不起作用。