![]()
#Mac emulator react native project android#These components can be installed later if needed.įor React Native, you need the Android 9 (Pie) SDK installed. Choose a "Custom" setup and ensure that the following components are checked: The Android SDK comes bundled in Android Studio, the official IDE for native Android Development and what we will be using for running Android emulators. Installing React Native CLI on Windows is the same as on macOS:Ħ. Check out this article for help getting this set up (I use the first option covered in the article). If you don't, I would recommend using an NVM alternative for Windows for better management of Node versions. Please note that I am going to assume that you have Node 8.3 or newer installed. Not everyone is on a Mac, for personal preference or financial reasons, especially outside of the United States. I would also like to take a moment to urge open source developers to give Windows a little love when possible. Unfortunately, iOS development on Windows is not possible (boo!). I wanted to walk through my process to hopefully make life easier for other Windows users that run into this issue. ![]() Iex "netsh interface portproxy add v4tov4 listenport=3333 listenaddress=127.0.0.I recently needed to get a new React Native Expo project up and running on my Windows machine and found that the documentation was a little scattered, especially in terms of setting up Watchman and Android Studio to run an Android emulator. $WSL_CLIENT = bash.exe -c "ifconfig eth0 | grep 'inet '" iex "netsh interface portproxy delete v4tov4 listenport=8081 listenaddress=127.0.0.1" | out-null A work around is to use the following script. Sometimes there are problems with the network forwarding. So the app can connect to the metro bundler from the emulator via Windows localhost. ![]() #Mac emulator react native project windows 10#Windows 10 version 2004 brings network forwarding from The metro bundler is running in WSL2, listening on port 8081. Socat relays the requests from wsl2 to windows using the following command: socat -d -d TCP-LISTEN:5037,reuseaddr,fork TCP:$(cat /etc/nf | tail -n1 | cut -d " " -f 2):5037Įnable access to metro bundler from Windows One solution is to use socat (thanks to the environment variable if necessary. Somtimes adb crashes using the environment variable config. Set environment variable to access adb server, WSL_HOST is ip of vEthernet (WSL) interface in windows export WSL_HOST=$(tail -1 /etc/nf | cut -d' ' -f2)Įxport ADB_SERVER_SOCKET=tcp:$WSL_HOST:5037 The vEthernet (Wsl) adapter belongs to the public profile Enable access to adb server from WSL2 With Windows Defender Firewall allowing access for the public profile, because Start adb server in Windows adb kill-serverĬhange firewall rule for adb.exe on first usage in Defender Popup or Nexus_5X_API_29) in windows "C:\Program Files (x86)\Android\android-sdk\emulator\emulator.exe" -avd Nexus_5X_API_29 ![]() Nexus_5X_API_29) in windows with Android Virtual Device Manager from Android Studio. PATH=$PATH:$ANDROID_SDK_ROOT/platform-toolsĮxport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64Ĭreate a virtual device (e.g. bash_profile export ANDROID_HOME=/home/xxx/Android/cmdline-tools/latestĮxport ANDROID_SDK_ROOT=/home/xxx/Android #Mac emulator react native project install#
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |