[英]I have created React native app and build it as a standalone android apk file but I am unable to use it without connecting to same network
I have created React native app with JSON server (use to transfer some data from my computer to my app) and build it as a standalone android apk file and installed it on my android device, but even after build it as a standalone apk file it can't work without connecting to the same network for fetching data from my JSON server.我已经使用 JSON 服务器创建了 React 本机应用程序(用于将一些数据从我的计算机传输到我的应用程序)并将其构建为独立的 android apk 文件并将其安装在我的 ZC31B32364CE19CA8FCD150A417ECCE5Z 文件中,但即使在它之后作为独立的 apk 文件构建设备如果不连接到同一网络以从我的 JSON 服务器获取数据,则无法工作。
Is there any way to use my app with the server running on my computer and without connecting to the same network?有什么方法可以将我的应用程序与我的计算机上运行的服务器一起使用,而无需连接到同一网络?
or can I run the JSON server online somewhere else, of course, free of cost as I am a developer and I am just trying as a sack of my knowledge and use that link in my app for fetching data?或者我可以在其他地方在线运行 JSON 服务器吗?
Thankx in advance!提前谢谢!
You can use something like https://my-json-server.typicode.com/ to host the JSON file.您可以使用https://my-json-server.typicode.com/之类的东西来托管 JSON 文件。 Then you can access it remotely anywhere.然后,您可以在任何地方远程访问它。 Another alternative is https://jsonbin.io/另一种选择是https://jsonbin.io/
In case you need more help, you can refer this article .如果您需要更多帮助,可以参考这篇文章。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.