NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Icons not showing after upgrade to 0.60

Open dowmeister opened this issue 7 years ago • 14 comments

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

dowmeister avatar Sep 15 '19 20:09 dowmeister

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.

tmaly1980 avatar Sep 16 '19 20:09 tmaly1980

https://github.com/GeekyAnts/NativeBase/pull/2924

tmaly1980 avatar Sep 16 '19 20:09 tmaly1980

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 avatar Sep 17 '19 14:09 jramalho

@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 avatar Sep 17 '19 14:09 tmaly1980

@tmaly1980 I wish i had the same luck, our project heavily rely on NativeBase haha.

jramalho avatar Sep 17 '19 14:09 jramalho

@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 avatar Sep 17 '19 14:09 tmaly1980

@tmaly1980 Thanks for the suggestion, gonna try that.

jramalho avatar Sep 17 '19 16:09 jramalho

@jramalho true. but it's a stupid bug, I think and should be fixed

dowmeister avatar Sep 17 '19 17:09 dowmeister

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.

xstable avatar Sep 25 '19 11:09 xstable

See here Native Base Icon

kerimkuscu avatar Oct 02 '19 05:10 kerimkuscu

@xstable it works.

ale-ishizawa avatar Jan 17 '20 14:01 ale-ishizawa

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.

hanykumar avatar Sep 18 '20 12:09 hanykumar

not work with v2.13.14

tree1891 avatar Nov 17 '20 05:11 tree1891

Can't use 2.13.14 as it has a breaking build error in web. Looking forward to the next release

tomvrampio avatar Nov 24 '20 16:11 tomvrampio