Follow the steps to run the code in android.
Step 1: Clone the project from github repo.
Step 2: Open it in any code editor (I prefer VS code).
Step 3: Install node_modules by running npm install command in terminal.
Step 4: Open android studio and open the react-native-app/android folder inside it.
Note: Android Studio will automatically start downloading the gradle and build it, which you can see in bottom part of android studio.
Step 5: After gradle files are downloaded and build successfully, go back to the code editor and try to run your app again using
npx react-native run-android
Note: If it shows the same error restart your code editor or laptop and it will work like a charm.
Follow the steps to run the code in ios.
Step 1: Clone the project from github repo.
Step 2: Open it in any code editor (I prefer VS code).
Step 3: Install node_modules by running npm install command in terminal.
Step 4: Open the XCode project of your app, located on ios/StackOverflow.xcworkspace. Then, you can achieve this by connecting the iPhone on your Mac computer, and simply build/run the app on the iPhone real device by using XCode.
Step 5: Or you can go back to the code editor and try to run your app again using
npx react-native run-ios
React Native Application created with help of Stack Exchange API.
To Run this project
For Android: npx react-native run-android
For IOS: npx react-native run-ios
For support or any help, email to shivakumarbdoddamani@gmail.com.