React Native Init Android,Ios and App Folder Missing

React Native iOS and Android folders not present

One of the points of Expo on top of React Native is that you don't go down to android or ios code. Expo deals with those folders for you, you don't need to interact with them. Is there a reason you need those folders? if so, you will have to eject. Here's the documentation to do so: Ejecting with ExpoKit

How can I regenerate ios folder in React Native project?

The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.

  • First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
  • Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
  • Change the name and version accordingly on package.json
  • Delete /ios and /android folders which are remaining from your older app.
  • Run $react-native upgrade to generate /ios and /android folders again.
  • Run $react-native link for any native dependency.
  • Finally run $react-native run-ios or anything you want.

Unable to see Android/iOS Folder in react native project

Running following commands should do the trick:

sudo rm -rf android/ ios/ #Delete Android and ios folders first...
react-native eject
react-native upgrade //rebuilds android/ios folders
react-native link
react-native run-android
react-native run-ios

React native: No android folder exist after installing react-native-maps

You cant use react-native-maps if you are using expo coz expo doesnt allow linking of native modules. So you have 2 options , either eject from expo to bare react native and use react-native-maps or try maps of expo expo-maps. there you have to do expo install react-native-maps

Hope it helps .feel free for doubts

React native: Android project not found. Maybe run react-native android first?

I raised this question and answered myself as I thought it will help others who are facing similar issue. I struggled a lot to find out the real reason behind it as the error shown in terminal was not precise.

To resolve the issue please upgrade the react-native package.

  1. Go to the Project root.

  2. Upgrade the React native package in the Command Prompt by typing :

    react-native upgrade.

  3. Then Accept to update all the Files by typing y (Yes) in the Command Prompt.

Reference: https://github.com/facebook/react-native/issues/9312



Related Topics



Leave a reply



Submit