简体   繁体   English

如何修复IOS设备上的应用程序崩溃

[英]How to fix app crashing on IOS devices react-native

I am building for first time an React - Native Application . 我第一次构建一个React-Native应用程序。 Until now we have tested the application on the several Android devices and no problem has been detected . 到目前为止,我们已经在多个Android设备上测试了该应用程序,尚未发现任何问题。 But when the application is runned on Ios devices it crashesh almost instantly . 但是,当应用程序在Ios设备上运行时,它几乎立即崩溃。 So my question is am i doing something wrong ? 所以我的问题是我做错了什么吗? I followed up the documentetion from the react-native web page and i have done the right installs , but still the problem occurs . 我从react-native网页上跟踪了该文档,并完成了正确的安装,但是仍然出现问题。 Also when i try to build up an Android or IOS simultaor with the command : 另外,当我尝试使用以下命令构建Android或IOS simultaor时:

  • react-native run-android react-native运行Android
    • react-native run-ios 反应本机运行iOS

It throws me an error : Android project not found. 它引发了一个错误:找不到Android项目。 Maybe run react-native android first? 也许先运行react-native android?

Or for Ios : iOS project folder not found. 或对于Ios:找不到iOS项目文件夹。 Are you sure this is a React Native project? 您确定这是一个React Native项目吗?

Error: iOS project folder not found. 错误:找不到iOS项目文件夹。 Are you sure this is a React Native project? 您确定这是一个React Native项目吗?

My folder looks like this : 我的文件夹如下所示:

在此处输入图片说明

Am i missing something that should be installed ? 我是否缺少应安装的东西? Can you givev me some hints ? 你能给我一些提示吗? Thank you ! 谢谢 !

PandaMastr, the example image indicates that this an expo react native application, to run it you will need to go the root folder and run npm start which will launch the application. PandaMastr,示例图像表明这是一个EXPO React Native应用程序,要运行该应用程序,您需要进入根文件夹并运行npm start才能启动该应用程序。 In order to use the react-native run commands you would need to eject the application ( always make a backup so you can revert if need be ); 为了使用react-native运行命令,您需要弹出应用程序(始终进行备份,以便在需要时可以还原); which would then create the android and iOS folder and install the react-native run aspects you are attempting to use. 然后会创建android和iOS文件夹并安装您要使用的react-native运行方面。

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

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