ScrollView子布局必须通过contentContainerStyle道具应用

问题描述:

我正在使用反应本机swiper。并显示此错误,我不知道为什么。它如何解决?过去,没有像这样的问题。这是第一次发生。哪里不对?ScrollView子布局必须通过contentContainerStyle道具应用

这里是一个充满错误的图像:

Here is the image of a full error

<Swiper loop={false} 
      index={0} 
      style={styles.wrapper} 
      activeDotColor={'#EEE'}> 

      <View style={styles.slide1}> 
      <Text style={styles.text}>Choose category you like</Text> 
      </View> 
      <View style={styles.slide2}> 
      <Text style={styles.text}>Bookmark articles that you</Text> 
      <Text style={styles.text}>like</Text> 
      </View> 
      <View style={styles.slide3}> 
      <Text style={styles.text}>Get notifications about your</Text> 
      <Text style={styles.text}>chosen topic</Text> 
      <Button style={styles.text} onPress={() => this.props.navigation.navigate("Home")}> 
       <Text style={styles.text}>Main Screen</Text> 
      </Button> 
      </View> 
     </Swiper> 
    ) 
    } else { 
     return <View></View> 
    } 
    } 
} 

const styles = { 
    wrapper: { 
    justifyContent: 'center', 
    alignItems: 'center' 
    }, 
    slide1: { 
    flex: 1, 
    justifyContent: 'center', 
    alignItems: 'center', 
    backgroundColor: '#9DD6EB' 
    }, 
    slide2: { 
    flex: 1, 
    justifyContent: 'center', 
    alignItems: 'center', 
    backgroundColor: '#97CAE5' 
    }, 
    slide3: { 
    flex: 1, 
    justifyContent: 'center', 
    alignItems: 'center', 
    backgroundColor: '#92BBD9' 
    }, 
    text: { 
    alignSelf: 'center', 
    color: '#FFF', 
    fontSize: 26, 
    fontWeight: 'bold' 
    }, 
} 

export default WelcomeScreen 

请帮助解决这个恼人的麻烦。

增添风采这样

<Swiper loop={false} 
      index={0} 
      contentContainerStyle={styles.wrapper} 
      activeDotColor={'#EEE'}>