科尔多瓦网:: ERR_INVALID_RESPONSE

时间:2020-06-09 09:48:21

标签: cordova

尝试在Cordova中加载外部网站(google.com)。

我的config.xml:

    <?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.test" version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Invest 2020</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="https://google.com" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-navigation href="*" />
    <allow-intent href="*" />
    <preference name="loadUrlTimeoutValue" value="99999999" />
    <platform name="android">

    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
    <icon src="www/img/icon.png" />
</widget>

尝试运行应用程序时出现错误:

net :: ERR_INVALID_RESPONSE

enter image description here

科尔多瓦版本9.0.0

Cordova平台android版本8.1.0

请帮帮我

1 个答案:

答案 0 :(得分:0)

我找到了解决方法:

cordova platform rm android
cordova platform add android