使用react-native-http-bridge在react native中创建http服务器

9rygscc1  于 2023-03-09  发布在  React
关注(0)|答案(1)|浏览(152)

我将使用react native创建一个http服务器,它的任务是响应大量的API,根据我的研究,我发现这可以使用两个包react-native-http-bridgereact-native-http-server来完成。(自动和手动)并启动程序,我遇到以下错误。如果您知道此问题的解决方案,或者有其他解决方案可以实现我要执行的操作,请提供指导。

zf9nrax1

zf9nrax11#

在react-native-http-bridge/android/build. gradle中进行此更改

dependencies {
    compile 'com.facebook.react:react-native:+'
    -compile 'com.google.android.gms:play-services-gcm:+'
    +compile 'com.google.android.gms:play-services-gcm:16.1.0'
    compile 'org.nanohttpd:nanohttpd:2.3.1'
}

看看这里:https://github.com/alwx/react-native-http-bridge/commit/a6c2c705561250198fc601a92b0d2579ec50fe11

相关问题