When I have updated my sdk version from API 26 to API 28, OKHttp mockserver fails to run in the device/emulator in my android instrumentation test. It ran perfectly in the older versions. I have checked in the Network Config
<network-security-config>
<domain-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">localhost</domain>
<domain-config>
</domain-config>
</network-security-config>