2017-04-25 44 views
7

我正在使用原生基礎來製作反應本地應用程序。我對這兩件事都很陌生。當我運行程序的時候,給了我這個錯誤:模塊AppRegistry是未註冊的可調用模塊(調用runApplication)

enter image description here

這裏是我的代碼:

export default class Point extends Component { 

    render() { 
     return (
      <Container> 
       <Header> 
        <Left> 
         <Button transparent> 
          <Icon name='menu' /> 
         </Button> 
        </Left> 
        <Body> 
         <Title>Header</Title> 
        </Body> 
        <Right /> 
       </Header> 
      </Container> 
     ); 
    } 
} 

這裏是我的版本的截圖

enter image description here

和nativebase版本爲"native-base": "^2.1.2"

+1

共享代碼。另外檢查是否有其他包裝商正在運行 –

回答

1

我已使用本機基地,爲我的應用程序在這裏是鏈接native base

,你可以看到有沒有應用程序的註冊表這樣

AppRegistry.registerComponent('Point',() => Point) 

,但我不得不這樣做運行我的應用程序index.ios.js`的`

5

您應該在index.ios.js文件的底部有這個 AppRegistry.registerComponent('Point',() => Point); 並導入AppRegistryreact-native

+0

Im使用nativeBase link go here – Asad