简体   繁体   English

IONIC应用程序显示没有互联网连接

[英]IONIC Application showing no internet connection

I have successfully installed cordova network plugin and no errors so far from the code side. 我已经成功安装了cordova网络插件,到目前为止,从代码端来看没有错误。

When I use ionic serve to get the app to run on my browser, it detects my wifi and the plugin recognizes a connection, and if i disable wifi on my computer, it again recognizes that there is no internet connection. 当我使用ionic serve来使应用程序在浏览器上运行时,它将检测到我的wifi,并且插件可以识别连接,如果我在计算机上禁用了wifi,则它又可以识别出没有互联网连接。

The problem now comes when I install the app onto an android phone after building. 现在,当我在构建后将应用程序安装到Android手机上时,就会出现问题。 I even have Bluestacks on my computer but the app does not get the network from there too. 我什至在计算机上都装有Bluestacks,但该应用程序也无法从那里获得网络。 Has anyone run into this problem? 有没有人遇到这个问题? How did you go through it? 您是如何经历的?

I do not think it is an issue with my code, so I am not posting code, unless someone will need it for clarification. 我认为这与我的代码无关,因此,除非有人需要对其进行澄清,否则我不会发布代码。

I hope someone is able to help. 我希望有人能够提供帮助。

Permission in androidManifest.xml androidManifest.xml中的权限

<uses-permission android:name="android.permission.INTERNET" />

config.xml do include: config.xml包括:

<access origin="*" />

Problem Solved : As Permission Issue Held Due to Permission Was Listed in Dangerous Permission. 解决的问题:由于在危险权限中列出了由于权限而导致的权限问题。

I Lowered my TargetSDKVersion 我降低了TargetSDKVersion

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM