Why after create-react-native-app
I don't have a folder android and ios?
Now I can't open this by react-native run-android
and can't put for example android permissions.
What is wrong?
Asked
Active
Viewed 516 times
0

Iva
- 2,447
- 1
- 18
- 28

github2017
- 103
- 1
- 10
3 Answers
0
you should run react-native init projectName
.pay attention you should run cmd as run as administrator

zohreh
- 1,055
- 1
- 9
- 26
-
but now i can't run my app n in expo – github2017 Aug 07 '18 at 09:45
0
Naviagte to project path and execute the following command to get android and ios folder
1. > npm i //To get all dependencies loaded
2. > react-native upgrade //To get android and ios folder
3. > react-native link //To link the dependencies to ios and android
4. > react-native run-android or react-native run-ios

Prabhu
- 1,057
- 7
- 13
-
do you know why i need to do it manually ? i dont see this in officla doc – github2017 Aug 07 '18 at 09:46
-
Kindly see this link https://facebook.github.io/react-native/docs/upgrading – Prabhu Aug 07 '18 at 09:57
0
There are two ways to create React native project.
create-react-native-app AwesomeProject
=> This used expo to create app and when you use this command to create app you will not findandroid
andios
folder you cant add platform specific libraries.react-native-init
=> this app is not created using expo you can find android and ios folder and can do native coding or use platform specific libraries as well as permission you mention.
In your case want to add permissions:
If you wish to do native coding (android and ios) or want to install Platform specific libraries i.e. npm link
you need to run npm run eject
command
(Note: Once you run eject
command you can't run your app using expo. So before doing this go through docs)

Revansiddh
- 2,932
- 3
- 19
- 33