简体   繁体   中英

Existing react-native project doesn't contain "android" folder, what to do?

My company gave me the source code for their mobile app written in react-native. It can be clearly seen that it was created using react-native cli. The "ios" folder exists there, but "android" folder is not included. I think previous developers deleted it at some point. I cannot run it on ios simulator because I don't have mac and I don't have iphone to use it with Vysor.

What should I do?

Eject and then link

react-native eject

react-native link

Can you try running:

npx react-native init YourProjectName

If you are running an old version of react-native you can try this one:

npm i react-native-eject
npm i @react-native-community/cli
react-native eject

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM