usesCleartextTraffic
1.android:usesCleartextTraffic
这个是在AndroidManifest.xml里的application标签的一个属性,用于配置明文密文请求管理
2.targetSdkVersion
目标API级别为27或更低的应用程序的默认值为“ true”。面向API级别28或更高级别的应用默认为“ false”
3.这个值会影响webview的拍照获取,设置为true时才能正确选取,false时暂时不知道如何处理
4.配置文件res/xml/network_security_config.xml
这个文件用于配置被允许访问的ip地址,这些ip地址上的服务可以使用http,而无需配置https
<?xml version="1.0" encoding="utf-8"?> <network-security-config> <domain-config cleartextTrafficPermitted="true"> <domain includeSubdomains="true">www.pgyer.com</domain> <domain includeSubdomains="true">app-global.pgyer.com</domain> <domain includeSubdomains="true">125.74.75.9</domain> <domain includeSubdomains="true">61.178.24.16</domain> <domain includeSubdomains="true">61.178.24.20</domain> <domain includeSubdomains="true">61.178.24.17</domain> <domain includeSubdomains="true">221.182.241.194</domain> <domain includeSubdomains="true">192.168.0.105</domain> <domain includeSubdomains="true">122.192.9.52</domain> <domain includeSubdomains="true">vfjupz.natappfree.cc</domain> </domain-config>
</network-security-config>
这个xml同样要配置在AndroidManifest.xml里的application标签里
android:networkSecurityConfig="@xml/network_security_config"
<application android:name=".context.AppApplication" android:allowBackup="false" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_launcher" android:supportsRtl="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true" tools:replace="android:allowBackup">
</application>
usesCleartextTraffic相关推荐
- Glide 加载图片不显示(Android9.0无法加载图片)
1 网络权限没有添加 <uses-permission android:name="android.permission.INTERNET" /> 2 就是现在使用的版 ...
- 安卓后端mysql_后端Spring Boot+前端Android交互+MySQL增删查改(Java+Kotlin实现)
1 前言&概述 这篇文章是基于这篇文章的更新,主要是更新了一些技术栈以及开发工具的版本,还有修复了一些Bug. 本文是SpringBoot+Android+MySQL的增删查改的简单实现,用到 ...
- Android --- AndroidManifest.xml文件内容详细介绍
文章目录 1.android:label="@string/app_name" 2. android:icon="@mipmap/ic_launcher"与an ...
- Android_NetWork_Test
文章目录 api27以前 配置文件申请网络权限 异步发送网络请求 使用HttpURLConnection api27以后 换成商城api Gsonfomat插件: api27以前 配置文件申请网络权限 ...
- AndroidManifest.xml文件详解(application)
http://blog.csdn.net/think_soft/article/details/7557101 语法(SYNATX): <application android:allowTas ...
- unity发布成手机app怎么不能被顶_Unity中Android API 28之后无法HTTP请求
本文节选自洪流学堂公众号技术专栏<大话Unity2019>,未经允许不可转载. 洪流学堂公众号回复log获取最新版运行时查看日志的工具. 小新:"最近我升级到Android AP ...
- java.net.UnknownServiceException: CLEARTEXT communication to wanandroid.com not permitted by network
java.net.UnknownServiceException: CLEARTEXT communication to wanandroid.com not permitted by network ...
- Android开发之下载Apk安装的方法兼容Android7.0和8.0及以上
具体查看代码: 首先在清单文件配置三个权限读写权限和请求安装权限(兼容Android8.0手机)如下: <!--安装apk权限--><uses-permission android: ...
- android阿里滑块验证码,在Android App中接入HTML5滑块验证
在您的Android App工程的Activity文件中,导入WebView组件的依赖库.import android.webkit.WebView; import android.webkit.We ...
最新文章
- NLP——基于transformer 的翻译系统
- Python的注释及乱码 || 变量及类型
- 使用GZipStream实现压缩和解压缩
- 计算机辅助设计b实验目的,上海电力学院电路计算机辅助设计1--含有受控源电路辅助分析...
- linux操作系统桌面应用与管理第2版,linux操作系统桌面应用与管理(62页)-原创力文档...
- 查询出两个表中不同的数据
- Solr Wiki文档
- 记录android离屏渲染的一些资料
- Codeforces Round #FF (Div. 2):Problem A - DZY Loves Hash
- Sample DataBase 资源
- Atitit.导出excel功能的设计 与解决方案
- Wireshark抓包分析WLAN连接过程
- HTK中Vocab字典的结构
- SNF快速开发平台--规则引擎在程序当中如何调用
- 扫码点餐系统开通后如何设置桌码和上传菜品?
- 腾讯优图开源项目全景图!
- pygame制作游戏全套的
- ABP官方文档(十三)【对象之间的映射】
- [转] Android开发环境的搭建 Android虚拟机搭建 安卓开发环境搭建
- 计算机音乐说散就散,说散就散(精彩音乐汇)
热门文章
- 2018html游戏引擎,技术驱动未来!全球知名游戏引擎巨头Unity确认参展2019 ChinaJoy...
- 基于单片机的防酒驾/酒精检测系统设计(#0425)
- PHPxiu视频互动系统
- 2022年,或许是未来10年经济最好的一年,2022年你毕业了吗?毕业后是怎么计划的?
- 适合养在办公室的18种植物
- 上线一套 BI 系统真的很贵?
- 实验吧 web 拐弯抹角
- 175.纯 CSS 实现视频转场特效
- https开头的网址是什么意思_网站https含义是什么?工作原理又是什么
- 飞信2009_拥有5亿用户的飞信为啥干不过微信,主要有2个原因?