【发布时间】:2018-06-26 12:16:39
【问题描述】:
我在我的 Windows PC 上使用 React native 0.52.0 和 react-native-cli 2.0.1 进行 android 开发。尽管我做了所有的改变。当我运行react-native run-android 时,它会成功构建,但是当我运行它时,我会得到默认的反应原生屏幕。
我运行react-native run-android时的结果@-
我得到的应用程序-
index.js
import { AppRegistry } from 'react-native';
import App from './App';
AppRegistry.registerComponent('albums', () => App);
app.js
import React from 'react'
import ReactNative, { Text } from 'react-native'
export default const App = () => {
return (
<Text>Hello World</Text>
)
}
当我运行react-native init albums 时,它只是创建了一个 index.js 文件,没有 index.android.js 或 index.ios.js 文件
我做错了什么?
【问题讨论】:
-
我觉得你需要研究一下。 stackoverflow.com/questions/36933287/…
标签: android react-native npm react-native-android