1

我已经为项目创建了最低限度的世博项目。我在使用文档中指定了 expo 矢量图标。所以它在浏览器和安卓模拟器中运行良好,这很好。之后,我使用命令将项目发布到 expo 帐户:“expo publish”并且它已成功发布。所以当我开始将生成的 QR 码扫描到手机中时。它不显示图标。显示一些编码字符串。已使用语法:

import { Ionicons } from '@expo/vector-icons';

<Ionicons name="add"  size={24} color="black" />

包.json

{
  "main": "index.js",
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@expo/vector-icons": "^12.0.4",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/material-bottom-tabs": "^5.3.14",
    "@react-navigation/native": "^5.9.3",
    "@react-navigation/stack": "^5.14.3",
    "expo": "~40.0.0",
    "expo-font": "~8.4.0",
    "expo-linear-gradient": "~8.4.0",
    "expo-splash-screen": "~0.8.0",
    "expo-status-bar": "~1.0.3",
    "expo-updates": "~0.4.0",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "~0.63.4",
    "react-native-gesture-handler": "~1.8.0",
    "react-native-paper": "^4.7.2",
    "react-native-reanimated": "~1.13.0",
    "react-native-safe-area-context": "3.1.9",
    "react-native-screens": "~2.15.2",
    "react-native-unimodules": "~0.12.0",
    "react-native-web": "~0.13.12",
    "react-redux": "^7.2.3",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "@babel/core": "^7.9.0",
    "babel-jest": "~25.2.6",
    "babel-plugin-module-resolver": "^4.1.0",
    "jest": "~25.2.6",
    "react-test-renderer": "~16.13.1"
  },
  "jest": {
    "preset": "react-native"
  },
  "private": true
}

如果代码中有任何问题,请帮助我。提前致谢。

4

0 回答 0