Seems you're trying to access 'ReactNative.Component' from the 'react-native' package. Perhaps you m

来源:互联网 发布:斐讯efa中文安卓编程 编辑:程序博客网 时间:2024/06/04 23:54
将这样的代码
var React = require('react-native'); // 引用React库var {    Component,    StyleSheet,    Text,    View,    Navigator,    TouchableOpacity    } = React; // 使用简写

// 使用Component的好处是, 可以自动生成注释

修改成

import React, { Component } from 'react';import {    AppRegistry,    StyleSheet,    Text,    View,    Image,    Navigator,    TouchableOpacity} from 'react-native';


0 0