after upgrading to expo sdk 33.0.0, when i build my react native expo app everything is ok but as soon as the app starts the the following error shows up:
fontFamily "ionicons" is not a system font and has not been loaded through Font.loadAsync
before the update i was using the sdk version 32.0.0 and everything was ok.
I tried to add the font as explained here https://docs.expo.io/versions/latest/guides/using-custom-fonts/ in my app.js componentDidMount function:
const Ionicons = require("./fonts/Ionicons.ttf");
...
componentDidMount() {
...
Font.loadAsync({
"Avenir-Book": AvenirBook,
"Avenir-Light": AvenirLight,
"Ionicons": Ionicons,
})
}
...
I also try to change the name in the loadAsync from "Ionicons" to "ionicons" but nothing changed.
The "Ionicons.ttf" inside the fonts folder file was copied from the node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts folder
---------EDIT--------- In all my react native expo project src i have not a single reference to Ionicon
Any help is appreciated, Thanks
import { Ionicons } from '@expo/vector-icons';
– hong developerexpo install asset => import { Asset } from 'expo-asset';
– hong developerimport { Ionicons } from '@expo/vector-icons'; ... componentDidMount() { ... Font.loadAsync({ "Avenir-Book": AvenirBook, "Avenir-Light": AvenirLight, "Ionicons": Ionicons, }) }
and the error is: asset.downloadAsync is not a function. (In 'asset.downloadAsync()', 'asset.downloadAsync' is undefined) But i'm not using Asset anywhere – Ve9