
Saturday, September 28, 2019
Most native apps render the components within the native shell but React compiles the source to original Android or IOS components using their SDK. Now let's dive into the main part.
We start with installing Chocolatey, a Package manager for windows which helps you to ease of doing the installation of packages without messing up with the system configurations.
To install, run your command prompt with administrative permissions and paste this PowerShell code.
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Now use chocolatey to install Nodejs, Python jdk
choco install -y nodejs, install python jdk8No problem if you have already installed nodejs and other requirements before , just quit the above step.
Now install Android studio (We require android SDK for developing android apps, Use Xcode for IOS)
Then install React Native using nodejs
npm install -g react-native-cli
Now we need to add Android_Home and platform-tools variables to the windows environment.
For windows10 Search→(type)Edit the system environment variables→Advanced→Environment Variables
add New and name it as Android_Home
c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk
Then edit PATH variable and add platform tools to the path variable
c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools
Now open android studio welcome screen and then click configure⇓
Then move to Appearance & Behavior → System Settings → Android SDK.
Install the ticked components and build tools that help you to run the android app.
If you want to run the app within the emulator download the emulator and then run, here I will use my android device and developer tools debug to run.
Now we all set to create our hello world app. Oh! No, we forgot about visual studio code! Let's install React native tools extension.
We are ready now!
Fire up your terminals and type react-native init MyApp
It creates your first react-native app
Now use react-native run-android to set all dependencies and run the app.
Hola! We have created our first react-native android app.
If you face any issues comment down.
Saturday, September 28, 2019
android
App development
IOS
Nodejs
react-native
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteNice article I was really impressed by seeing this blog, it was very interesting and it is very useful for me.Informative blog! it was very useful for me.Thanks for sharing
ReplyDeleteReact Native App Development Company