-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
  • 105
  • 5
  • 14

1 Answers1

0

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

android:usesCleartextTraffic="true"
Dijkgraaf
  • 10,108
  • 17
  • 36
  • 52