-1

HTTP FAILED: java.net.UnknownServiceException: CLEARTEXT communication to localhost not permitted by network security policy

Getting this above mentioned issue while calling localhost api using retrofit.

sushma1008
  • 125
  • 5
  • 14

1 Answers1

0

Add the below code in the android manifest file's application tag

android:usesCleartextTraffic="true"
Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54