阵营Native-错误 - >路线首先应在使用堆栈导航声明屏幕

问题描述:

阵营Native- 路线“第一”应申报的屏幕,不知道!为什么会出现此错误?阵营Native-错误 - >路线首先应在使用堆栈导航声明屏幕

请查看dir的附件截图。

enter image description here

import React, { Component } from 'react'; 
import { 
    Platform, 
    StyleSheet, 
    Text, 
    View 
} from 'react-native'; 

const instructions = Platform.select({ 
    ios: 'Press Cmd+R to reload,\n' + 
    'Cmd+D or shake for dev menu', 
    android: 'Double tap R on your keyboard to reload,\n' + 
    'Shake or press menu button for dev menu', 
}); 

import { StackNavigator } from 'react-navigation'; 

import Register from './src/container/Register'; 
import MobileVerification from './src/container/Verification/MobileVerification'; 
import SignUpOtp from './src/container/SignUpOtp/SignUpOtp'; 




const Navigation = StackNavigator ({ 
    First: { 
    Screen: Register 
    }, 
    Second: { 
    Screen: MobileVerification 
    }, 
    Third: { 
    Screen: SignUpOtp 
    } 
}); 

export default Navigation; 

你应该申报screen而不是Screen

const Navigation = StackNavigator({ 
    First: { 
     screen: Register 
    }, 
    Second: { 
     screen: MobileVerification 
    }, 
    Third: { 
     screen: SignUpOtp 
    } 
}); 
+1

感谢的人!它解决了..作为新人,我无法检测到我错在哪里。 –