when I implement Image-slider on my application using this example that time I have faced this error.
import React,{Component} from 'react'
import {View,Text,TouchableOpacity, ViewPagerAndroid} from 'react-native'
import Infoslider from 'react-native-infoslider'
export default class example extends Component {
constructor(props) {
super(props);
this.state = {
data:[
{
title:"Hello World",
text:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard",
image: require('../Images/Group.png')}
]
};
}
render() {
return (
<Infoslider
data={this.state.data} />
);
}
}
You should update the react-native-swiper module to nightly. Then, npm clear cache.
Please follow this:
- cd android
- ./gradlew clean
- cd ..
- yarn remove react-native-swiper
- yarn add react-native-swiper@nightly
- rm -rf node_modules
- npm cache clean --force
- npm install
- react-native run-android
it will work. but if no, please restart system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With