PhoneGap Build 不包括 android 或浏览器以外平台的权限

PhoneGap Build not including permissions for android or platforms other than browser

我有一个 phonegap 应用程序在 opened/loaded 通过官方 phonegap 应用程序时运行良好(ajax 执行 http 请求等)。

但是当我上传和构建应用程序并从 build.phonegap 网站下载 apk 时,外部 http 请求的 none 有效。 我还注意到,因为我在 android 上,所以在安装或服务请求(6.0+)时从未请求过应用程序的权限,并且在应用程序管理器中查看应用程序时,它被列为没有使用权限。所以我假设在没有互联网许可的情况下,不允许我的应用连接到 http 请求。

所以我的问题是如何让它请求我需要的互联网等权限?我认为 phonegap 应该默认请求诸如互联网和其他一些东西,但似乎根本没有请求它们。

不过我也会注意到,在应用程序中,平台文件夹中列出的唯一平台是浏览器,因此我没有平台->android->config.xml 来进行任何可能的编辑正如我在本网站的几个地方看到的那样,但我的项目根目录 config.xml 看起来像这样,我的潜在敏感信息被替换为 ******* 的。

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.******.mainapp" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
    <name>********</name>
    <description>
        **********
    </description>
    <author email="*******" href="********">
        ***********
    </author>
    <content src="index.html" />
    <access origin="http://*******.com/*" />
    <access origin="http://admin.*******.com/*" />
    <access origin="*" />
    <preference name="Orientation" value="portrait" />
</widget>

编辑:任何潜在的帮助、建议或建议都会有所帮助和感激,因为我一整天都在尝试解决这个问题但无济于事

EDIT2:应用程序中的示例请求

var http = new XMLHttpRequest();
var url = "http://www.********.com/functions/*******.php";
http.open("GET", url, true);
http.send();        
http.onreadystatechange = function() {
    if (http.readyState == 4) {
        if (http.responseText.indexOf("success") >= 0) {
            var data = http.responseText.split(" - ")[1];
            populate(data);
        } else {
            alert(http.responseText);
        }
        loadingScreen.style.display = "none";
    }
};

最初来自 Kerri Shotts 的回答解决了我的问题,

config.xml 需要包含行

<plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />

添加后一切正常