Search code examples
androidreact-nativecreate-react-native-app

No folders android and ios


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?


Solution

  • 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)