Icons not showing after upgrade to 0.60
I'm trying to use FontAwesome5 in my app instead of MaterialIcons (after last update i receive a huge quantity of warnings to refactor completely the app so i wanted to get the moment to switch to FontAwesome5).
But doesnt work.
I can use FontAwesome5 icon sets only specifying explicitly the type="FontAwesome5" in icons but not setting it from iconFamily in theme variable.
I tried to:
- copy manually all fonts from react-native-vector-icons to assets/fonts in Android
- add apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" in android/app/build.gradle
- install explicitly react-native-vector-icons and link them with react-native link
- clean the build
- rebuild a lot of times
- try to debug with console.log and console.warn to check if iconFamily prop was setted correctly.
No way.
Android 9 Emulator "native-base": "^2.13.8", "react": "16.8.6", "react-native": "0.60.0", "react-native-vector-icons": "^6.6.0"
Please help
I'm experiencing the same thing too! Perhaps the theme files have changed dramatically? I'll try using the default (with the icon font changed) and report back.
https://github.com/GeekyAnts/NativeBase/pull/2924
So actually you need to especify the Type of the icon to use the Icon component (like materialCommunityIcons, FontAwesome and stuff), like NativeBase ignores your theme. That's easy doe, but the problem is using an icon on an actionSheet
@jramalho Honestly I just gave up with NativeBase and am using react-native-vector-icons directly. I ended up writing a very simple custom icon component to wrap some sensible defaults (size).
@tmaly1980 I wish i had the same luck, our project heavily rely on NativeBase haha.
@jramalho I'm still using NativeBase for everything else. It is just wrapping react-native-vector-icons anyway! Nothing is stopping you from using it directly.
@tmaly1980 Thanks for the suggestion, gonna try that.
@jramalho true. but it's a stupid bug, I think and should be fixed
Had the same issue after upgrading to 0.60.5.
Adding apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" in /app/build.gradle worked for me.
See here Native Base Icon
@xstable it works.
Hi, please update Native-Base with latest v2.13.14 and let us know if the issue still persists by providing minimal code reproduction. Closing for now.
not work with v2.13.14
Can't use 2.13.14 as it has a breaking build error in web. Looking forward to the next release