0

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?

Iva
  • 2,447
  • 1
  • 18
  • 28
github2017
  • 103
  • 1
  • 10

3 Answers3

0

you should run react-native init projectName.pay attention you should run cmd as run as administrator

zohreh
  • 1,055
  • 1
  • 9
  • 26
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
0

There are two ways to create React native project.

  1. create-react-native-app AwesomeProject => This used expo to create app and when you use this command to create app you will not find android and ios folder you cant add platform specific libraries.
  2. 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