Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thzinc/ecb9d3a0db7f19213d497c407443d348 to your computer and use it in GitHub Desktop.
Save thzinc/ecb9d3a0db7f19213d497c407443d348 to your computer and use it in GitHub Desktop.
React native on VS Emulator and Windows 10

React native on VS Emulator and Windows 10

Visual Studio Emulator

  1. Download and install emulator - https://www.visualstudio.com/vs/msft-android-emulator/

Android SDK tools

  1. Download commandline tools (see bottom of page) - https://developer.android.com/studio/index.html
  2. Unzip archive to C:\Program Files (x86)\Android SDK
  3. Go to C:\Program Files (x86)\Android SDK\tools\bin and run .\sdkmanager.exe "platform-tools" (it will install adb required by react native)
  4. Specify SDK path:
    • Open registry editor (Win+R, enter "regedit.exe")
    • Go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
    • Add new folder (key) with name Android SDK Tools
    • Add new string value with name Path and value C:\Program Files (x86)\Android SDK
    • Add ANDROID_HOME environment variable set to C:\Program Files (x86)\Android SDK

Start app

To start app launch emulator device and then run npm run android in project folder

Troubleshooting

  • Invalid arguments (3) error in the Emulator logs. Try to repair Emulator in the Uninstall or change program.
  • Expo timeout error. Try to use Windows Phone Emulator address. Run ipconfig to see ip configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment