React-native-paper 的复选框中出现了奇怪的十字

2024-03-24

I am using a checkbox from react-native-paper library but when I render that checkbox in my component a strange special box with a cross appears on screen as you can see in the picture. enter image description here

这是我的代码:

Import

import { TextInput, Checkbox } from 'react-native-paper';

成分

 <Checkbox
                status={checked ? 'checked' : 'unchecked'}
                onPress={() => { setChecked(!checked); }}
            />

正如提到的https://github.com/oblador/react-native-vector-icons#option-with-gradle-recommended https://github.com/oblador/react-native-vector-icons#option-with-gradle-recommended

Adding apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"在文件底部android/app/build.gradle我解决了同样的问题,图标现在可以正确显示。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

React-native-paper 的复选框中出现了奇怪的十字 的相关文章

随机推荐