React-native-vector-icons显示模糊的符号

我已经安装了react-native-vecotor。并且在使用它们时,它们会显示模糊的符号。如何使用这个库?平台:Android

import React from 'react';
import {View,Text,StyleSheet} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';

const SearchBar = () => {
    return (
        <View style={styles.background}>
            <Icon name="md-body" color='#000'  size={25} />
        </View>
    );
};
const styles = StyleSheet.create({
    background:{
        backgroundColor:'#F0EEEE',marginHorizontal: 15,height:45,borderRadius:5,}
});
export default SearchBar;
liulinjian123 回答:React-native-vector-icons显示模糊的符号

Ionicons没有元素名称body。您可以在这里react-native-vector-icons

进行检查
<Icon name="ios-body" color='#000'  size={25} />
,

如果您使用的是本机版本0.60 ++,那肯定是链接问题!

在更新react-native之后,我面临着同样的事情,但是解决了这个问题,请按照我的指示进行操作。

  1. 清洁gradlew(可选,但推荐)
       要清理gradle,请转到android文件夹并打开cmd并运行// don't useEffect(() => { },[...props.items.map((i) => i.id)]) // this makes new array with spread operator (...),and then returns another one with .map method // do useEffect(() => { },[props.items]) // this just points to an existing array we want to watch for changes
  2. 转到gradlew clean,将其添加到文件末尾=> android/app/build.gradle

  3. 现在重新编译(react-native run-android / run-ios)它必须现在可以工作!..

,

我只是从设备上重新安装项目应用程序。可行!

本文链接:https://www.f2er.com/3074152.html

大家都在问