简体   繁体   English

现有的 react-native 项目不包含“android”文件夹,怎么办?

[英]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.我的公司给了我他们用 react-native 编写的移动应用程序的源代码。 It can be clearly seen that it was created using react-native cli.可以清楚的看出是使用 react-native cli 创建的。 The "ios" folder exists there, but "android" folder is not included.那里存在“ios”文件夹,但不包括“android”文件夹。 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.我无法在 ios 模拟器上运行它,因为我没有 mac,也没有 iphone 可以将它与 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:如果你运行的是旧版本的 react-native,你可以试试这个:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Android模拟器上运行react-native项目不起作用 - Running react-native project on Android emulator doesn't work 在现有项目React-Native中添加现有的本机项目Android - Add existing native project Android in exist project React-Native 在现有的 React Native iOS 项目中安装 React-Native Android? - Installing React-Native Android in existing React Native iOS project? 无法在Android模拟器上运行现有的react-native项目 - Trouble running existing react-native project on Android emulator VSCode会忽略我在react-native项目中的/ android文件夹 - VSCode ignores my /android folder in react-native project React-Native 项目不会在 ios 或 android 上构建 - React-Native Project won't build on ios or android 无法在 android 上运行 react-native 新项目 - can't run an react-native new project on android [react-native] onPanResponderRelease 在 FlatList 或 ListView 上不会在 android 中触发 - [react-native]onPanResponderRelease on FlatList or ListView doesn't trigger in android Android react-native显示MyUserLocation没有出现 - Android react-native showsMyUserLocation doesn't appear 为什么滑动不适用于 Android [React-Native] 上的 appium? - Why swipe doesn't work with appium on Android[React-Native]?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM