开发服务器返回响应错误代码:样板代码上的 500

The development server returned response error code: 500 on a boiler plate code

我在 WebStorm IDE 中创建了一个 React Native 应用程序。这只是默认样板代码,我遇到了这个错误。

谁能帮我解决这个问题?

尝试关闭所有内容并重新打开它们,如果不起作用,请键入以下内容

     cd android 

然后

    gradlew clean

然后

    cd..

最后再次尝试 运行 您的应用程序

试试这个 adb reverse tcp:8081 tcp:8081 来制作反向代理并将您的 android phone 连接到您的节点服务器

问题与react-native版本有关。为了解决这个问题,我必须在创建应用程序时指定正确的 react-native 版本。

确切的命令是:

react-native init App_Name --version 0.55.4

我被多人建议降级已创建项目的 react-native 版本。我尝试了多种方法,但其中 none 有效。

Instances of Git-Bash and Android emulator, showing a successful build.