'React native init android,ios and app folder missing
Solution 1:[1]
We can generate android and ios folder by using upgrade
Run react-native upgrade
to generate /ios and /android folders again.
Run react-native link
for any native dependency. (if needed)
Finally run
react-native run-ios
or
react-native run-android
Solution 2:[2]
Probably you created your project using create-react-native-app, which is an even more simplified toolchain.
You should probably eject if you need android/ios native configs or something.
Please take a look at this doc: https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md
Solution 3:[3]
Try this to generate the Android and iOS folder without change version
react-native eject
react-native link
Solution 4:[4]
Install a new file using powershell instead of cmd.
Solution 5:[5]
Run following commands
1. npx react-native eject
After running above command you can see output in console as follows
info Generating the iOS folder.
info Generating the Android folder.
Next below command
2. npx react-native run-android
Solution 6:[6]
Try update ur nodejs and npm to the latest version then run everything again starting from init
Solution 7:[7]
npm run eject
next we will get some couple of questions,
? how would you like to eject from create-react-native-app
React-Native : I'd like a regular react native project
? What should your app appear as on a users's home screen? _Your wish____
? What should your Android Studio and Xcode projects be called? rncourse
After Ejected Successfully the project structure will change, added folders android and ios.
happy coding
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Alex Buznik |
Solution 3 | Mahdy Aslamy |
Solution 4 | rami mustafa |
Solution 5 | niran |
Solution 6 | William Kheng |
Solution 7 |