Apache Cordova(Cordova-android)出现错误net :: err_connection_refuse
我正在尝试使用Apache Cordova构建一个Android应用程序,我遇到了一个错误:
Application Error
net::ERR_CONNECTION_REFUSED (http://localhost:8080/index.html)
现在我不知道该怎么办...
我的config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.blabla" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<!-- metadata ...... !-->
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<icon src="icons/mdpi.png" density="mdpi" />
<icon src="icons/hdpi.png" density="hdpi" />
<icon src="icons/xhdpi.png" density="xhdpi" />
<icon src="icons/xxhdpi.png" density="xxhdpi" />
<icon src="icons/xxxhdpi.png" density="xxxhdpi" />
<preference name="android-minSdkVersion" value="23" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" />
</edit-config>
</platform>
</widget>
我的插件
cordova-plugin-inappbrowser
cordova-android-support-gradle-release
cordova-plugin-crypt-file-android
Apache Cordova V11.0.0
非常感谢!
i'm trying to build a Android app with Apache Cordova, i got an error:
Application Error
net::ERR_CONNECTION_REFUSED (http://localhost:8080/index.html)
Now I don't know what to do...
My config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.blabla" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<!-- metadata ...... !-->
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<icon src="icons/mdpi.png" density="mdpi" />
<icon src="icons/hdpi.png" density="hdpi" />
<icon src="icons/xhdpi.png" density="xhdpi" />
<icon src="icons/xxhdpi.png" density="xxhdpi" />
<icon src="icons/xxxhdpi.png" density="xxxhdpi" />
<preference name="android-minSdkVersion" value="23" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" />
</edit-config>
</platform>
</widget>
My plugins
cordova-plugin-inappbrowser
cordova-android-support-gradle-release
cordova-plugin-crypt-file-android
Apache Cordova v11.0.0
Thanks so much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论