我是本机反应的新手,
我读了一个tutorial,将自定义字体导入到我的项目中。
我的字体不起作用。
这是我的项目结构:
这是我的 package.json :
{
"name": "Arvandkala",
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-native-scripts": "1.14.0",
"jest-expo": "~27.0.0",
"react-test-renderer": "16.3.1"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^27.0.1",
"react": "16.3.1",
"react-native": "~0.55.2"
},
"rnpm": {
"assets": [
"./assets/fonts"
]
}
}
当我运行react-native link
时,我也在终端上看到以下消息:
Scanning folders for symlinks in /Users/hamed/Desktop/arvandkala/Arvandkala/node_modules (12ms)
rnpm-install info Linking assets to ios project
rnpm-install ERR! Something went wrong while linking. Error: Cannot read property 'pbxprojPath' of null
Please file an issue here: https://github.com/facebook/react-native/issues
Cannot read property 'pbxprojPath' of null
答案 0 :(得分:1)
运行此命令并尝试。
react-native upgrade