1

I'm using Azure Cognitive Services for an Android mobile application and got stuck on an error. Help!

Currently using the FACE API and trying to retrieve a response about the Facial Attributes but keep getting this error when I didn't have it earlier:

ERROR: Detection failed: Unable to resolve host "centralus.api.cognitive.microsoft.com": No address associated with hostname

Previously, I was only testing the facial detection with the drawFaceRectangle method, and had no errors with the endpoint but now that I'm trying to request the facial attributes I get this error. Any suggestions?

Nicolas R
  • 13,336
  • 2
  • 25
  • 55
slope
  • 33
  • 3

1 Answers1

0

Add this line to the AndroidManifest.xml which will enable your app the permission to use the internet

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Sajeetharan
  • 203,447
  • 57
  • 330
  • 376