4

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>
Sindre Sorhus
  • 62,972
  • 39
  • 168
  • 232
Prabhakaran
  • 1,264
  • 2
  • 20
  • 47

1 Answers1

3

I figured out by changing the cleartext value in the base-config. May be it will useful to some one.

<network-security-config> 
   <base-config cleartextTrafficPermitted="true" /> 
</network-security-config>
Prabhakaran
  • 1,264
  • 2
  • 20
  • 47