Android.
Which versions are you using:
This error should not be thrown, as having or not having font family Arial available seems to make no difference to the swiper.
If Arial has not been loaded in as a fontFamily every time the swiper is mounted, or when you swipe to another component using the swiper, this error is thrown.
Use the swiper on any React Native project without Arial loaded and set showButtons={true} . Then use the swiper component to trigger this error.
Since having or not having Arial seems to make no difference, you can 'fool' swiper into thinking Arial is loaded by adding 'Arial':require('./anyfont.ttf') to the section where you load your fonts (usually Expo.Font.loadAsync() ) , replacing anyfont.ttf with any font file that can be loaded.
you must go node_modules/react-native-swiper/index.js find fontFamily: 'Arial' and remove it
Edited : Solution here https://github.com/leecade/react-native-swiper/issues/444#issuecomment-311583763
_Hey @Sadoyangrigor !
Thank you for the answer to this question, as I ran into the same problem, however removing something in node_modules is not something we can consider a good solution, is there anything else we could do that you recommend (that would persist an installation on another collaborator's computer) ?_
Instead of adding font,
I just overrided the button style:
nextButton={styles.buttonText} prevButton={styles.buttonText}
buttonText: {
fontSize: 50,
color: '#007aff',
}
Most helpful comment
you must go node_modules/react-native-swiper/index.js find fontFamily: 'Arial' and remove it