react-native - 如何修复 React Native Galio-Framework 上损坏的图标?
问题描述
我正在使用 Galio-Framework 开发 React Native 应用程序(不是 expo)。 https://galio.io/docs/#/components
我试图Checkbox
使用示例代码。这是我从示例中获得的代码。
<Checkbox color="primary" flexDirection="row-reverse" label="row-reverse checkbox" />
<Checkbox color="info" initialValue={true} label="initialValue set to true" />
<Checkbox color="error" initialValue={true} label="different icon" iconFamily="font-awesome" iconName="plane" />
<Checkbox color="warning" labelStyle={{ color: '#FF9C09' }} label="labelStyle used here" />
不幸的是,我遇到了破碎的图标。
我的环境:
"dependencies": {
"@material-ui/icons": "^4.11.2",
"@react-native-community/cli": "^5.0.1",
"@react-native-community/masked-view": "^0.1.9",
"@react-native-community/toolbar-android": "^0.1.0-rc.2",
"@react-navigation/bottom-tabs": "^5.2.6",
"@react-navigation/drawer": "^5.4.1",
"@react-navigation/native": "^5.1.5",
"@react-navigation/stack": "^5.2.10",
"axios": "^0.21.1",
"galio-framework": "^0.8.0",
"global": "^4.4.0",
"i18n-js": "^3.2.1",
"jetifier": "^1.6.5",
"lodash": "^4.17.13",
"moment": "^2.24.0",
"react": "16.9.0",
"react-native": "0.63.1",
"react-native-calendars": "1.265.0",
"react-native-divider": "^1.0.3",
"react-native-eject": "^0.1.2",
"react-native-gesture-handler": "^1.5.0",
"react-native-gifted-chat": "^0.11.3",
"react-native-lightbox": "^0.8.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^1.3.1",
"react-native-modal": "^9.0.0",
"react-native-modal-datetime-picker": "^6.0.0",
"react-native-modal-dropdown": "0.7.0",
"react-native-paper": "^3.1.1",
"react-native-reanimated": "^1.8.0",
"react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^2.5.0",
"react-native-ui-lib": "^3.39.0",
"react-native-vector-icons": "^6.6.0",
"react-redux": "^6.0.1",
"recompose": "^0.30.0",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-persist": "^5.10.0",
"redux-promise": "^0.6.0",
"redux-thunk": "^2.3.0",
"victory-native": "^31.0.0"
},
来人帮帮我。感谢您的关注。
解决方案
- 打开 android/app/build.gradle
- 添加
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
推荐阅读
- html - 如何在另一个 iframe 中打开显示在 iframe 中的网站上的链接?
- python - 通过标题而不是位置选择要导入python的excel列
- javascript - 如何摆脱第一个文本值以设置 GeoJSON 文件
- docker - Docker + uWSGI + NGINX + Swagger 给出错误:socket.error: [Errno 98] 地址已在使用中
- python - Python3 找不到包模块
- c# - 如何使用继承向 .NET Core 2.0 中的 aspNetUser 表添加字段
- c++ - !=的另一种方式
- c# - 在 C# 中计算 dataGridView 中第一列的重复值
- javascript - Problem with Intersection Observer API and Bootstrap
- amazon-web-services - AWS NLB 到 ECS 集群的运行状况检查失败