ZZR老师写的http请求、插件无法铭文传输即http协议无法使用 原创

发布于 2021-3-8 16:21
浏览
1收藏

按照ZZR老师的文档配置会走 onFailure 回调 提示无法明文传输

然后我翻阅配置文档的配置开启明文传输有提示

errorMessage:Failed to parse XML configuration from network_security_config

{
  "app": {
    "bundleName": "com.example.shangjinlieren",
    "vendor": "example",
    "version": {
      "code": 1,
      "name": "1.0"
    },
    "apiVersion": {
      "compatible": 4,
      "target": 4,
      "releaseType": "Beta2"
    }
  },
  "deviceConfig": {
    "default": {
      "network": {
        "usesCleartext": true,
        "securityConfig": {
          "domainSettings": {
            "cleartextPermitted": true

          }
        }
      }
    }
  },
  "module": {
    "reqPermissions": [{"name":"ohos.permission.INTERNET"}],
    "package": "com.example.shangjinlieren",
    "name": ".MyApplication",
    "deviceType": [
      "phone"
    ],
    "distro": {
      "deliveryWithInstall": true,
      "moduleName": "entry",
      "moduleType": "entry"
    },
    "abilities": [
      {
        "skills": [
          {
            "entities": [
              "entity.system.home"
            ],
            "actions": [
              "action.system.home",
              "action.list.detail"
            ]
          }
        ],
        "orientation": "unspecified",
        "name": "com.example.shangjinlieren.MainAbility",
        "icon": "$media:icon",
        "description": "$string:mainability_description",
        "label": "shangjinlieren",
        "type": "page",
        "launchType": "standard",
        "metaData": {
          "customizeData": [
            {
              "name": "hwc-theme",
              "value": "androidhwext:style/Theme.Emui.Light.NoTitleBar",
              "extra": ""
            }
          ]
        }
      }
    ]
  }
}

©著作权归作者所有,如需转载,请注明出处,否则将追究法律责任
标签
收藏 1
回复
举报
回复
添加资源
添加资源将有机会获得更多曝光,你也可以直接关联已上传资源 去关联
    相关推荐