Setting Up Development Environment Using React Native on Windows
Step 1: Install Visual Studio Code
Download and install the latest version of Visual Studio Code for Windows from www.cronistalascolonias.com.ar
Step 2: Install Android Studio
- Download and install the latest version of Android Studio for Windows from www.cronistalascolonias.com.ar
- Android Studio installs the latest Android SDK by default. React Native requires Android (Marshmallow) SDK or higher. I decided to use Android (Nougat). Feel free to use the latest SDK.
- Make sure you have the following SDK tools installed:
Important: You will need the Intel x86 Emulator Accelerator (HAXM installer) to run the emulator on Windows. For more information, please refer to the following link: www.cronistalascolonias.com.ar
Note: You need to enable Intel Virtualization Technology by changing a BIOS setting. Please look at the following link to see how that is done:
- Configure the ANDROID_HOME environment variable. Open the System pane under System and Security in the Windows Control Panel, then click on Change settings. Open the Advanced tab and click on Environment Variables. Click on New to create a new ANDROID_HOME user variable that points to the path to your Android SDK:
- Finally, add Android Debug Bridge (ADB) to the PATH environment variable. This will help you know which devices are connected or which emulators are currently running. Install location of ADB: C:\Users\apatil\AppData\Local\Android\Sdk\platform-tools\www.cronistalascolonias.com.ar
Step 3: Install Node
- Download and install the latest version of www.cronistalascolonias.com.ar from www.cronistalascolonias.com.ar Note: Npm is installed with www.cronistalascolonias.com.ar
Note: Make sure you add NPM to the PATH environment variable.
- Once npm is installed, install React Native CLI by running the following command from the Windows prompt command line or Integrated Terminal in Visual Studio Code. Note: Integrated Terminal can be found under View →Integrated Terminal
Step 4: Using embedded JDK
Android Studio comes with an embedded JDK which is recommended. Make sure you check the following option under File → Other Settings → Default Project Structure in Android Studio:
Step 5: Creating a new React Native application
Finally, lets create our first React Native application by running the following command in your workspace location
react-native init SampleReactNativeProjectThis creates the following project directory structure when you open the project in Visual Studio Code.
Step 6: Building for Android
- Before we go ahead and run the app, open up the “android” directory in our project in Android Studio and create an “assets” directory under app/src/main.
- To simplify the build and install process, in www.cronistalascolonias.com.ar, add the following script under “scripts”:
- Now run the following command to install the app and see it running on the emulator. This runs the script above which we set up in www.cronistalascolonias.com.ar
This starts up a Metro Bundler instance in a new command prompt instance and installs the app on the emulator as shown below:
Note: If you still run into the following error, “www.cronistalascolonias.com.arortedClassVersion Error: com/android/build/gradle/AppPlugIn: Unsupported www.cronistalascolonias.com.ar version ”, ensure that you have checked the embedded JDK as shown in step 4 above.
0 thoughts to “React native download for windows 10”