createStackNavigator在ios版本模型上不起作用

时间:2019-01-30 02:00:51

标签: react-navigation react-navigation-stack

我的应用是通过反应本机,反应导航,本机库创建的。 我的应用在android和ios调试模型上运行良好。但是在执行createStackNavigator时,在ios发行模式下已关闭。

app.js是

import React, { Component } from 'react';
import { Platform, AppRegistry ,StyleSheet, Text, Image, Navigator,View, AsyncStorage } from 'react-native';
import { Root, Button } from 'native-base';

import { createStackNavigator, createAppContainer } from 'react-navigation';



type Props = {};
class HomeScreen extends React.Component<Props> 
{

  render() {
    return <Root><Text>dsdsdsdsds</Text></Root>;
  }
}

const AppNavigator = createStackNavigator(
{
  Welcome: {
    screen: HomeScreen,
  },

},
{
    headerMode: 'none',
}
);

const AppContainer = createAppContainer(AppNavigator);

export default new AppContainer();//  createAppContainer(AppNavigator);

我的环境是:

software    version
react-navigation    3.0.9
react-native    0.58.1
node    v10.15.0
npm 6.4.1

错误消息是:

2019-01-28 21:14:26.264 [error][tid:com.facebook.react.JavaScript] null is not an object (evaluating 'C.State')
2019-01-28 21:14:26.268487+0800 ProvRegApp[8267:2226746] null is not an object (evaluating 'C.State')
2019-01-28 21:14:26.275 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: null is not an object (evaluating 'C.State')
2019-01-28 21:14:26.275236+0800 ProvRegApp[8267:2226732] Unhandled JS Exception: null is not an object (evaluating 'C.State')
2019-01-28 21:14:26.277 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)
2019-01-28 21:14:26.277424+0800 ProvRegApp[8267:2226746] Module AppRegistry is not a registered callable module (calling runApplication)### Expected Behavior

0 个答案:

没有答案