加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

React Native 环境(1)

发布时间:2020-12-15 20:24:08 所属栏目:百科 来源:网络整理
导读:1. npm install -g yarn react-native-cli=Yarn是 Facebook 提供的替代 npm 的工具,可以加速 node 模块的下载 or yarn global add create-react-native-app 2. or npm install -g react-native-cli = base cli https://www.npmjs.com/package/react-native-

1. npm install -g yarn react-native-cli=>Yarn是 Facebook 提供的替代 npm 的工具,可以加速 node 模块的下载
or yarn global add create-react-native-app
2. or npm install -g react-native-cli => base cli
https://www.npmjs.com/package/react-native-cli
3. npm install -g create-react-native-app =>better integrated with exp,跳过了配置 Android 和 iOS 编译环境的步骤
4. npm i -g exp
https://www.npmjs.com/package/exp
npm install expo-cli --global
expo init my-new-project
cd my-new-project
expo start

5. windows Expo - XDEclient:
doc: https://docs.expo.io/versions/latest/guides/building-standalone-apps.html
install: https://docs.expo.io/versions/v29.0.0/introduction/installation
source code: https://github.com/expo/expo
tools: https://expo.io/? => login to see your? c/s expo projects,? b/s snack projects

6. npm config set registry https://registry.npmjs.org => try it,slower but better than taobao.org when have error run npm i
7. npm install -g cnpm --registry=https://registry.npm.taobao.org


Fettaching lodash Error: connect ECONNREFUSED 221.179.46.190:443=> swith to taobao.org
8. npm i -g lodash --registry=https://registry.npm.taobao.org
9. npm i -g lodash.assign --registry=https://registry.npm.taobao.org
10. npm i -g [email?protected]^4.6.0
11. npm i –g [email?protected]^4.5.0
12. npm i -g [email?protected]
13. create-react-native-app my-app
14. App.js support Monitoring file changes by expo tools,building is very slowly in ios expo
15. https://snack.expo.io/ =>another:?online b/s create demo and sync to app running by expo app. Snack lets you to run complete React Native projects in the browser. No download required.
16. As of March 29,2018,the Expo client on iOS can no longer scan QR codes. ?Read more.. => then Ios use default ios camera to scan and click it.
17. expor? ios similator https://itunes.apple.com/app/apple-store/id982107779
18.?expor??ios andorid similator: avd android aslo can running.

19 . buiding spend 3 mins in iphone6s and 4?mins minsandroid?similator

20. 使用app.json进行配置 => reference https://www.cnblogs.com/gdsblog/p/8540353.html

21. app.json =>https://docs.expo.io/versions/latest/guides/building-standalone-apps.html

{ "expo": { "name": "Your App Name","icon": "./path/to/your/app-icon.png","version": "1.0.0","slug": "your-app-slug","sdkVersion": "XX.0.0","ios": { "bundleIdentifier": "com.yourcompany.yourappname" },"android": { "package": "com.yourcompany.yourappname" } } }

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读