# react-native-start **Repository Path**: mengyou/react-native-start ## Basic Information - **Project Name**: react-native-start - **Description**: react-native-start 学习项目 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-02-03 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #react-native-start #学习步骤 注意:react-native-cli: 0.1.10 1. 按照官网准备好安卓的环境 https://facebook.github.io/react-native/docs/android-setup.html#content https://facebook.github.io/react-native/docs/linux-windows-support.html#content https://facebook.github.io/react-native/docs/tutorial.html#content 2. 执行 https://facebook.github.io/react-native/docs/tutorial.html#content 这里更改一些步骤 1). 如果遇到问题 `npm install --save react-native` failed 解决方法: * 则更改react-native-cli\index.js中 function run(root, projectName) { // 这段注释掉 手动执行此步骤 /*exec('npm install --save react-native', function(e, stdout, stderr) { if (e) { console.log(stdout); console.error(stderr); console.error('`npm install --save react-native` failed'); process.exit(1); } }); */ checkNodeVersion(); var cli = require(CLI_MODULE_PATH()); cli.init(root, projectName); } * mkdir AwesomeProject * cd AwesomeProject * 手动执行 npm install --save react-native --registry=http://registry.npm.taobao.org/ --loglevel=info 注意:解决一下下载中出现的问题,直到install成功为止 * cd ../ * 再执行 react-native init AwesomeProject 出现覆盖提示,则执行覆盖即可 3. 当前版本默认配置: compileSdkVersion 23 buildToolsVersion "23.0.1" 确保相应的Android sdk 版本存在 注意:gradle执行的时候build慢,可以在gradle.properties添加org.gradle.daemon=true 4. 连接手机 执行adb devices确保手机链接成功 http://facebook.github.io/react-native/docs/running-on-device-android.html#content 5. cd AwesomeProject react-native run-android react-native start 成功! #问题 1. 启动满屏红字错误 http://www.tuicool.com/articles/6jmyem 确保react-native start执行 2. Unknown option babelrc.stage