import {
Platform
} from 'react-native';
import {Navigation} from 'react-native-navigation';
import {registerScreens} from './screens';
registerScreens();
// this will start our app
Navigation.startSingleScreenApp({
screen: {
screen: 'Hiran.StartUpScreen',
title: 'Start Screen'
},
animationType: 'slide-down'
});
我的index.android.js文件代码是
__STRESS_TEST__ = false;
// import App from './src/app';
import App from './src/app_single';
我收到的错误如下:
undefined is not an object (evaluating 'NativeReactModule.startApp')
startApp
D:\android\Hiran\node_modules\react-native-navigation\src\platformSpecific.android.js:10:20
startSingleScreenApp
D:\android\Hiran\node_modules\react-native-navigation\src\deprecated\platformSpecificDeprecated.android.js:38:31
startSingleScreenApp
D:\android\Hiran\node_modules\react-native-navigation\src\Navigation.js:139:47
<unknown>
D:\android\Hiran\src\app_single.js:12:32
loadModuleImplementation
D:\android\Hiran\node_modules\metro-bundler\src\Resolver\polyfills\require.js:174:12
guardedLoadModule
D:\android\Hiran\node_modules\metro-bundler\src\Resolver\polyfills\require.js:126:36
_require
D:\android\Hiran\node_modules\metro-bundler\src\Resolver\polyfills\require.js:110:20
<unknown>
D:\android\Hiran\index.android.js:3
loadModuleImplementation
D:\android\Hiran\node_modules\metro-bundler\src\Resolver\polyfills\require.js:174:12
guardedLoadModule
D:\android\Hiran\node_modules\metro-bundler\src\Resolver\polyfills\require.js:119:45
_require
D:\android\Hiran\node_modules\metro-bundler\src\Resolver\polyfills\require.js:110:20
global code
我想我错过了一些东西,但不知道第一次使用react-native-navigation是什么。请帮忙 !提前致谢