iosnode.jsreactjsswiftreact-native

React Native Elements icons (react-native-vector-icons) showing a question mark instead of actual icon


I have the issue where the icons on react native elements from react-native-vector-icons are not showing, instead they show as a question mark.

I tried even going to this directory of icons and play around with the name and no luck. https://oblador.github.io/react-native-vector-icons/

This is how it looks right now. IOS Preview

This is how I got my package.json

{
  "name": "LimitCalisthenics",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-community/masked-view": "^0.1.11",
    "@react-navigation/native": "^5.9.8",
    "@react-navigation/stack": "^5.14.9",
    "@rneui/base": "^4.0.0-rc.7",
    "@rneui/themed": "^4.0.0-rc.7",
    "pod-install": "^0.1.38",
    "react": "18.2.0",
    "react-native": "0.72.0",
    "react-native-gesture-handler": "^2.12.0",
    "react-native-reanimated": "^3.3.0",
    "react-native-safe-area-context": "^4.6.3",
    "react-native-screens": "^3.22.0",
    "react-native-vector-icons": "^9.2.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/eslint-config": "^0.72.2",
    "@react-native/metro-config": "^0.72.6",
    "@tsconfig/react-native": "^3.0.0",
    "@types/metro-config": "^0.76.3",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.76.5",
    "prettier": "^2.4.1",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "engines": {
    "node": ">=16"
  }
}

Followed this guide when installing React Native Elements https://reactnativeelements.com/docs/installation

This is how I have my component https://codeshare.io/9OJA37


Solution

  • follow the steps in this link https://github.com/oblador/react-native-vector-icons and make sure to perform necessary steps to properly implement react native vector icon for android and ios