React Native iOS and Android folders not present

前端 未结 10 983
旧巷少年郎
旧巷少年郎 2020-12-13 00:03

I\'m new to react native, and I\'ve been having some trouble understanding the folder structure of the app which should supposedly be present in the project folder on creati

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 00:14

    The simplest way I know

    1) Take your app name from your current app.json, let's say the name is "mynativeapp"

    2) make a new folder somewhere outside of your current project folder

    3) start in it:

    react-native init mynativeapp

    4) the command above will make android and ios folders internally compatible by name with your project

    5) copy android/ios folders into your project folder

    Now you can try to start your native project. I checked that for Android:

    react-native run-android

    enjoy!

    P.S. "react": "16.9.0", "react-native": "0.61.4"

提交回复
热议问题