小编Xen*_*omy的帖子

React-native 无法识别的字体系列错误

我想在我的react-native项目中使用自定义字体,但我在ios模拟器上遇到错误我该如何解决它
我尝试了各种方法但找不到解决方案。

无法识别的字体系列:sfproregular

错误: 错误截图

项目结构: 项目结构截图

反应本机.config.js

module.exports = {
    project: {
      ios: {},
      android: {}, // grouped into "project"
    },
    assets: ["./assets/fonts/"], // stays the same
  };
Run Code Online (Sandbox Code Playgroud)

版本

 "react": "16.13.1",
    "react-native": "0.63.2",
    "react-native-gesture-handler": "^1.7.0",
    "react-native-phone-input": "^0.2.4",
    "react-navigation": "^4.4.0"
Run Code Online (Sandbox Code Playgroud)

我想使用“Welcome.js”中的字体

欢迎.js

import React from 'react';
import {
  SafeAreaView,
  StyleSheet,
  ScrollView,
  View,
  Text,
  Image,
  StatusBar,
  TouchableOpacity,
  Button,
  ImageBackground,
} from 'react-native';

import Logo from '../components/WelcomeLogo';

import arkaplan from '../assets/images/arkaplan.png';


export default class Welcome extends React.Component {

  render() {

  return ( …
Run Code Online (Sandbox Code Playgroud)

xcode fonts ios react-native react-native-ios

4
推荐指数
1
解决办法
6227
查看次数

标签 统计

fonts ×1

ios ×1

react-native ×1

react-native-ios ×1

xcode ×1