简体   繁体   English

我已经创建了 React 本机应用程序并将其构建为独立的 android apk 文件,但如果不连接到同一网络,我将无法使用它

[英]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.

相关问题 我无法从 react native 构建 APK - I am unable to build APK fron react native 我无法打开 React 本机 android 应用程序,android 构建失败 (app:compileDebugJavaWithJavac) - I am unable to open React native android app , android build is getting failed (app:compileDebugJavaWithJavac) 我已经使用 ionic 和 angular 构建了一个简单的应用程序? 如何在不使用 android studio 的情况下生成带电容器的 apk 文件? - I have build an simple app using ionic with angular ? How do i generate apk file with capacitor without using android studio? 我有在 React Native 中从我的应用程序获取 apk 的问题 - i have propblem for getting apk from my app in react native React native:我在 GitHub 中的 Keystore 文件出现错误 android 构建 apk 的操作 - React native: I'm getting error with Keystore file in GitHub Actions with android build apk 我创建了一个 react-native 应用程序,它在调试模式下运行良好,但银行屏幕出现在发布 APK 中 - I have created a react-native app that works perfectly fine in the debug mode but bank screen appears in release APK 我正在尝试构建 apk,但在 react-native 中出现此错误 - i am trying to build apk but i get this error in react-native 我正在构建反应原生应用程序。 在 android 构建中出现一些错误 - I am building react native app . getitng some error in android build 构建.apk以响应原生应用 - Build .apk for react native app 我是 Android 应用程序开发的新手,遇到了问题。 我有一个 APK 文件,但我想找到这个文件可以在哪个 API 级别运行? - I am new to Android app development, I am encountering problem. I have an APK File, but I would like to find in what API Level this file can run?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM