按照官网先:react-native link @ant-design/icons-react-native
然后在android\app\src\main目录下在添加assets文件
然后在node_modules\ @ant-design\icons-react-native目录下找到fonts文件:
然后把fonts文件复制过去android\app\src\main\assets文件中:
然后再在android\app\build.gradle中添加配置:
// ttf文件对应你fonts里文件的名字
project.ext.vectoricons = [
iconFontNames: [ 'FontAwesome.ttf', 'antfill.ttf', 'Feather.ttf', 'antoutline.ttf' ] // Name of the font files you want to copy
]
然后重新运行可以了