zoukankan      html  css  js  c++  java
  • Windows 安装react native

    1、下载node.js (https://nodejs.org/en/)

    2、安装node.js,安装完成后按住 图标键+R ,输入CMD进入命令行终端,输入npm -v

    C:UsersAdministrator>npm -v
    5.6.0

    3、输入 npm install -g react-native-cli 安装命令行工具

    C:UsersAdministrator>npm install -g react-native-cli
    C:UsersAdministratorAppDataRoaming
    pm
    eact-native -> C:UsersAdministratorAppDataRoaming
    pm
    ode_modules
    eact-native-cliindex.js
    + react-native-cli@2.0.1
    added 41 packages in 4.898s

    4、查看帮助:

    C:UsersAdministrator>react-native --help
    
      Usage: react-native [command] [options]
    
    
      Commands:
    
        init <ProjectName> [options]  generates a new project and installs its dependencies
    
      Options:
    
        -h, --help    output usage information
        -v, --version output the version number
    
    
    C:UsersAdministrator>

    5、安装Android Studio

    http://www.android-studio.org/

    安装完成后

    6、创建应用:

    C:UsersAdministrator>react-native init 你的项目名称
    This will walk you through creating a new React Native project in C:UsersAdministratorLoveDemo
    'yarn' �����ڲ����ⲿ���Ҳ���ǿ����еij���
    ���������ļ���
    Installing react-native...
    Consider installing yarn to make this faster: https://yarnpkg.com
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN react-native@0.55.3 requires a peer of react@16.3.1 but none is installed. You must install peer dependencies yourself.
    npm WARN eslint-plugin-react-native@3.2.1 requires a peer of eslint@^3.17.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    
    + react-native@0.55.3
    added 696 packages in 316.306s
    Setting up new React Native app in C:UsersAdministratorLoveDemo
    Installing React...
    npm WARN eslint-plugin-react-native@3.2.1 requires a peer of eslint@^3.17.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    
    + react@16.3.1
    added 1 package in 5.065s
    Installing Jest...
    npm WARN eslint-plugin-react-native@3.2.1 requires a peer of eslint@^3.17.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    
    + react-test-renderer@16.3.1
    + babel-preset-react-native@4.0.0
    + jest@22.4.3
    + babel-jest@22.4.3
    added 299 packages and updated 1 package in 22.568s
    To run your app on iOS:
       cd C:UsersAdministratorLoveDemo
       react-native run-ios
       - or -
       Open iosLoveDemo.xcodeproj in Xcode
       Hit the Run button
    To run your app on Android:
       cd C:UsersAdministratorLoveDemo
       Have an Android emulator running (quickest way to get started), or a device connected
       react-native run-android (表示已经完成)


     

  • 相关阅读:
    centos下修改hosts
    metasploit rpc
    使用Suricata和ELK进行网络入侵检测
    查询存储设备的UUID
    CentOS基础命令大全
    两个有序数组合并到一个新数组
    dubbo
    redis基本数据类型【3】-List类型
    redis基本数据类型【2】-Hash类型
    redis基本数据类型【1】-String类型
  • 原文地址:https://www.cnblogs.com/ywf520/p/8994775.html
Copyright © 2011-2022 走看看