代码之家  ›  专栏  ›  技术社区  ›  Hamed mayahian

未加载本机自定义字体

  •  0
  • Hamed mayahian  · 技术社区  · 6 年前

    我读了一本书 tutorial

    我的字体不工作。

    以下是我的项目结构:

    enter image description here

    这是我的 包.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
    
    1 回复  |  直到 6 年前
        1
  •  1
  •   Sahesh    6 年前

    react-native upgrade