Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native React Native Shoutem UI工具包图标不工作_React Native_Shoutem - Fatal编程技术网

React native React Native Shoutem UI工具包图标不工作

React native React Native Shoutem UI工具包图标不工作,react-native,shoutem,React Native,Shoutem,在这里您可以看到图标未加载。有人能帮我找到解决办法吗 代码内容: import {Icon, Row} from '@shoutem/ui'; return ( <View style={styles.container}> <NavigationBar title="All Restaurants" /> <View style={styles.row}>

在这里您可以看到图标未加载。有人能帮我找到解决办法吗

代码内容:

import {Icon, Row} from '@shoutem/ui';

return (
            <View style={styles.container}>
                <NavigationBar title="All Restaurants" />
                <View style={styles.row}>
                <Row styleName="small" >
                    <Icon name="play"/>
                    <Text>About</Text>
                    <Icon styleName="disclosure" name="right-arrow"/>
                </Row>
              </View>
            </View>
        );
从'@shoutem/ui'导入{Icon,Row};
返回(
关于
);

可能是字体加载的问题。您是否可以检查@shoutem/ui的Github以了解类似问题?有一个是关于图标显示为中文字母的。您尝试过其他图标名称吗?

可能是加载字体的问题。您是否可以检查@shoutem/ui的Github以了解类似问题?有一个是关于图标显示为中文字母的。您是否尝试使用其他图标名称?

对我来说,出现此问题的原因是字体文件不在react本机目录根目录下的
android/app/src/main/assests/font/
文件夹中

我将所有字体文件从(您也可以在项目目录/node_modules/@shoutem/ui/examples/RestaurentsApp/android/app/src/main/assests/font/)复制到上述文件夹中,并重新构建了应用程序


这对我有效,我希望它也能对你有效。

对我来说,出现此问题是因为字体文件不在react本机目录根目录下的
android/app/src/main/assests/font/
文件夹中

我将所有字体文件从(您也可以在项目目录/node_modules/@shoutem/ui/examples/RestaurentsApp/android/app/src/main/assests/font/)复制到上述文件夹中,并重新构建了应用程序


这对我有用,我希望它也能对你有用。

我知道我在回应一个旧的帖子,但当它首先出现在谷歌上时,我相信很多遇到同样问题的人都会遇到这个问题

npm install@shoutem/ui--save
之后,我意识到我忘了运行
react native link


跳过此步骤会导致字体和资源(包括图标)未安装。运行link命令修复了丢失的字体。

我知道我正在响应一个旧的线程,但当它首先出现在Google for中时,我相信许多遇到同样问题的人都会遇到这个问题

npm install@shoutem/ui--save
之后,我意识到我忘了运行
react native link


跳过此步骤会导致字体和资源(包括图标)未安装。运行link命令修复了丢失的字体。

这是一个与此问题非常相似的问题
https://github.com/shoutem/ui/issues/82
。建议使用shoutem中的
Text
组件,而不是react-naitveno中的组件,它不起作用。我对图标有问题,而不是文本组件。如何运行项目?如果您没有使用
shoutem
CLI,则必须在运行应用程序之前在项目根目录中执行
react native link
命令。这是一个与此问题非常类似的问题
https://github.com/shoutem/ui/issues/82
。建议使用shoutem中的
Text
组件,而不是react-naitveno中的组件,它不起作用。我对图标有问题,而不是文本组件。如何运行项目?如果未使用
shoutem
CLI,则在运行应用程序之前,必须在项目根目录中执行
react native link
命令。