嵌套在文本节点下的意外视图类型:class com。 facebook.react.uimanager.LayoutShadowNode

时间:2017-03-27 11:08:12

标签: react-native react-native-android

我正在开发一个示例应用程序,当我正在开发示例.js页面时,它正在变得如同下面显示的那样eroor。请纠正此错误 这是我的代码:

/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 */
 /* To  View the user Bookings Screen */
 import React,{Component} from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Navigator,
  TouchableOpacity,
  Image
} from 'react-native';



class DiagnosticCalender extends React.Component {
  render() {
    return (
       <View style={{flexGrow:1,backgroundColor:'green'}}>
        <Text style={styles.welcome}>
          Coming Soon
        </Text>
      </View>
    );
  }
};

var styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    fontWeight:'bold',
    margin: 10
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  }
});


module.exports = DiagnosticCalender;

所以,当我运行应用程序时出现此错误,这是我的代码。enter image description here

0 个答案:

没有答案