Closed momolly1024 closed 1 year ago
Hi, Why Icon always no show (or show like error)
Here is my code
import { BottomNavigation, Button, } from 'react-native-paper'; import Icon from 'react-native-vector-icons/FontAwesome'; ... <Button icon="camera" onPress={() => alert('qwe')}> ALERT </Button> <Icon.Button name="facebook" backgroundColor="#3b5998" onPress={() => alert('qwe')}> Login with Facebook </Icon.Button> ...
Show like this ↓
package.js
{ "name": "pj0815", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "@react-navigation/material-bottom-tabs": "^6.2.2", "react": "18.0.0", "react-native": "0.69.4", "react-native-paper": "^4.12.4", "react-native-vector-icons": "^9.2.0" }, "devDependencies": { "@babel/core": "^7.12.9", "@babel/runtime": "^7.12.5", "@react-native-community/eslint-config": "^2.0.0", "babel-jest": "^26.6.3", "eslint": "^7.32.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.70.3", "react-test-renderer": "18.0.0" }, "jest": { "preset": "react-native" } }
Waht should i do to fix this or Is there any setting wrong in my project?
Thank you!
Sorry I found the miss
should add this in app/build.gradle
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
Closed!
Hi, Why Icon always no show (or show like error)
Here is my code
Show like this ↓
package.js
Waht should i do to fix this or Is there any setting wrong in my project?
Thank you!