无法识别的命令“链接”在链接反应本机中的字体时
尝试在React Native Project中链接自定义字体,当使用NPX React-Native链接时,我会发现一个错误,说未识别的命令“链接”
是否有一种解决此问题的方法?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
尝试在React Native Project中链接自定义字体,当使用NPX React-Native链接时,我会发现一个错误,说未识别的命令“链接”
是否有一种解决此问题的方法?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
由于自动链接,链接和UNLINK命令已在。
所以,请尝试以下操作:
Due to autolinking, link and unlink commands have been removed in React Native 0.69.
So, please try this:
手动链接已从React-Native 0.69中删除,有利于自动链接功能,因此现在您可以在本机模块中链接您的资产,否则您可以使用
react-nortiative-asset
剩下的步骤与板条箱中的crate相同
react-native.config.js
安装下面的React-Native-Asset运行下方
manual linking has been removed from react-native 0.69 in favour of autolinking feature so now you have link your assets in native module or else you can use
react-native-asset
remaining steps are same as before crate a file in root directory of project
react-native.config.js
after installing react-native-asset run below command
图标的手册设置&尝试以下步骤
1.添加此行android/app/build.gradle
申请来自:“ ../../ node_modules/reaeact-native-vector-icons/fonts.gradle”
2. ADD此行Android/setter.gradle
包括“:反应 - 媒介 - 元素”
project(':react-native-vector-icons')。projectDir = new file(rootproject.projectdir,'../ node_modules/reaeact-native-vector-icons/android'):
Manual setup for icons & try these steps
1.add this line android/app/build.gradle
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
2.add this line android/setting.gradle
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android'):