In the res/xml/network_security_config.xml file, add the following:
<network-security-config>
<debug-overrides>
<trust-anchors>
<certificatessrc="system" />
<certificatessrc="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
Create a debug build.
Build with a debug configuration.
Unity
Unity deprecated the use of res folders in the Assets/Plugins/Android directory.
These instuctions show you how to create a debuggable APK with proxy support when you use Unity to develop your application:
Create an Android Library by creating a new folder Assets/Plugins/Android/«name-of-your-library».androidlib.
Create an AndroidManifest.xml file in Assets/Plugins/Android/«name-of-your-library».androidlib/, and add the following to that file: