当我运行ionic cordova run android --livereload时,我得到这个错误:
net::ERR_CLEARTEXT_NOT_PERMITTED (http://192.168.0.5:8100/)

我的目标是Android SDK 28。我知道Android不再允许普通的HTTP连接了。
有解决办法吗?
发布于 2019-06-30 05:44:49
将此属性添加到config.xml中的<widget>标记:
<widget ... xmlns:android="http://schemas.android.com/apk/res/android">将此代码添加到您的config.xml:
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" />
</edit-config>在构建发布APK文件时,不要忘记恢复这些更改。
https://stackoverflow.com/questions/56821000
复制相似问题