[英]React Native App runs only through the browser
When I start my app through expo start
in the terminal, the QR code doesn't generate.当我通过expo start
在终端中启动我的应用程序时,不会生成二维码。 And when I launch it through the Expo app on my phone当我通过手机上的 Expo 应用程序启动它时
the result is that the project is online but it has a different thumbnail and launches through the browser:结果是该项目在线,但它具有不同的缩略图并通过浏览器启动:
If I try and change the url of it from http://192.168.1.94:19006
to exp://192.168.1.94:19006
like the rest of my apps, it shows If I try and change the url of it from http://192.168.1.94:19006
to exp://192.168.1.94:19006
like the rest of my apps, it shows
and after clicking the view error log at the bottom, it returns点击底部的查看错误日志后,返回
Uncaught Error: java.io.IOException: Manifest string is not a valid JSONObject or JSONArray: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta httpEquiv="X-UA-Compatible" content="IE=edge" /> This viewport works for phones with notches. It's optimized for gesture
How do I make it run normally on my phone through the expo app instead of through the browser?如何通过 expo 应用程序而不是通过浏览器使其在手机上正常运行?
This is, in my experience, an issue not relating to your code, but the settings on your phone or the network itself.根据我的经验,这与您的代码无关,而是与您的手机或网络本身的设置有关。
Here's a few steps I recommend:以下是我推荐的几个步骤:
This can be a real pain, good luck to all.这可能是一个真正的痛苦,祝大家好运。
Restarting the terminal where you're running Expo is what worked on my end:)重新启动您正在运行 Expo 的终端对我来说是有效的:)
Check you app.json, list your OS's in platforms检查您的 app.json,在平台中列出您的操作系统
"expo": {
"name": "",
"platforms": [
"ios",
"android",
"web"
],
...
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.