开发服务器返回的响应错误代码:404 react native [英] The development server returned response error code:404 react native
本文介绍了开发服务器返回的响应错误代码:404 react native的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在cmd中运行类似本机的应用程序
I am trying to run react native app like this in cmd
cd C:\Users\User\Desktop\js
react-native run-android
推荐答案
从react-native v.47升级到最新版本后,我遇到了这个问题.
I ran into this after upgrading from react-native v.47 to latest.
之前,我的项目使用两个索引文件 index.ios.js
和 index.android.js
.在此更新之后,只需一个文件入口点, index.js
.将索引逻辑移到同一级别的单个 index.js
文件中,然后重试.这为我解决了错误.
Before, my project was using two index files, index.ios.js
and index.android.js
. After this update only one file entry point is required, index.js
. Move your index logic into a single index.js
file that is at the same level and try again. This solved the error for me.
这篇关于开发服务器返回的响应错误代码:404 react native的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文