Cordova 无法在phonegap中连接到INTERNET

Cordova 无法在phonegap中连接到INTERNET,cordova,phonegap-plugins,Cordova,Phonegap Plugins,在我的移动应用程序中,我想从服务器获取一些数据。 我读过很多文章,认为我的错误是由于 xml文件中没有此代码 <access origin="*"/> 但是我已经在我的配置文件中添加了这个。我的应用程序仍然无法从服务器获取数据 请提供帮助您可以使用 phonegap plugin add https://github.com/apache/cordova-plugin-whitelist.git 来自CLI的命令 然后添加首先,我建议您确保安装了下面提到的插件 cordov

在我的移动应用程序中,我想从服务器获取一些数据。 我读过很多文章,认为我的错误是由于 xml文件中没有此代码

<access origin="*"/> 

但是我已经在我的配置文件中添加了这个。我的应用程序仍然无法从服务器获取数据
请提供帮助

您可以使用

phonegap plugin add https://github.com/apache/cordova-plugin-whitelist.git
来自CLI的命令


然后添加

首先,我建议您确保安装了下面提到的插件

cordova插件网络信息

cordova插件白名单

有关这些插件的更多信息,请访问 和

如果仍然不起作用,请在您的platforms/android/androidManifest.xml文件中添加以下标记

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


希望这能起作用。

尝试使用“如何在我的文件中使用它…”。。请帮我解决这个问题,因为我们不能帮助你
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />