我是反应本机的新手。我正在尝试添加博览会图标,当项目在设备上运行时,我收到此错误:
{
"name": "TrackYourFitness",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"expo": "^36.0.2",
"react": "16.9.0",
"react-native": "0.61.5"
},
"devDependencies": {
"@babel/core": "^7.8.3",
"@babel/runtime": "^7.8.3",
"@react-native-community/eslint-config": "^0.0.6",
"babel-eslint": "^10.0.3",
"babel-jest": "^25.1.0",
"eslint": "^6.8.0",
"eslint-plugin-flowtype": "^4.6.0",
"jest": "^25.1.0",
"metro-react-native-babel-preset": "^0.58.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
}
}Run Code Online (Sandbox Code Playgroud)
我尝试了纱线反应本机链接,但它不起作用。
我该如何修复它?提前致谢!
根据您的错误消息,您正在尝试调用downloadAsync包中的方法expo-file-system。
您的package.json.
要安装它:运行以下命令:
expo install expo-file-system
Run Code Online (Sandbox Code Playgroud)
但我认为这与您的问题无关,因为您正在谈论图标。Icons 包已经包含在 Expo 中,所以它可以工作。
供参考: https: //docs.expo.io/versions/latest/guides/icons/
| 归档时间: |
|
| 查看次数: |
10537 次 |
| 最近记录: |