天天看点

安卓targetSdk升级到24后如何抓包

1、在res/xml文件夹下面新建network_security_config.xml文件

<network-security-config>
    <debug-overrides>
        <trust-anchors>
            <!-- Trust user added CAs while debuggable only -->
            <certificates src="user" />
        </trust-anchors>
    </debug-overrides>
</network-security-config>
           

2、application中引用

android:networkSecurityConfig="@xml/network_security_config"
           
zzz