Skip to content

Instantly share code, notes, and snippets.

@xcession
Last active April 21, 2020 13:10
Show Gist options
  • Save xcession/f72098c0a4fdb8c2a665eac531924d77 to your computer and use it in GitHub Desktop.
Save xcession/f72098c0a4fdb8c2a665eac531924d77 to your computer and use it in GitHub Desktop.
[dev env react (windows)] macOS React/React Native Development Environment #env #react #react-native #windows

Windows React/React Native Development Environment

     _                              
  __| | _____   __   ___ _ ____   __
 / _` |/ _ \ \ / /  / _ \ '_ \ \ / /
| (_| |  __/\ V /  |  __/ | | \ V / 
 \__,_|\___| \_/    \___|_| |_|\_/  
          Windows React/React Native
  • Install Node & Watchman
$ choco install node.js
$ choco install watchman
  • Install Python 2
$ choco install python2
  • Install Yarn
$ choco install yarn
  • Install JDK
$ choco install jdk8
  • Install Android Studio
$ brew cask install android-studio
  • Install Android SDK

    • Open SDK Manager
    • Select SDK Platforms tab
    • Check Show Package Details in the bottom right corner
    • Expand Android 9 (Pie)
    • Check Android SDK Platform 28
    • Check Google APIs Intel x86 Atom System Image
    • Click "Apply" to download and install the Android SDK
  • Configure ANDROID_HOME environment variable

    • Open the System pane under System and Security in the Windows Control Panel
    • Click Change settings...
    • Open Advanced tab
    • Click on Environment Variables...
    • Click on New
    ANDROID_HOME
    C:\Users\username\AppData\Local\Android\Sdk
    

    Make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio "Preferences" dialog, under Appearance & Behavior → System Settings → Android SDK

  • Create Android Virtual Device using the AVD Manager

  • Run react-native and expo without global install

    • To create react-native project
     $ npx react-native init <project>
    
    • To create expo project
    $ npx expo init <project>
    
  • (Optional) Install React Native

    • Using npm
    $ npm install -g react-native-cli
    $ npm install -g expo-cli
    
    • Using yarn
    $ yarn global add react-native-cli
    $ yarn global add expo-cli
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment