microsoft / Cognitive-Face-Android

Cognitive Services Face client library for Android.
https://www.microsoft.com/cognitive-services/en-us/face-api
Other
269 stars 151 forks source link

HttpClient is deprecated on Android 6.0 #50

Closed raghunandankavi2010 closed 5 years ago

raghunandankavi2010 commented 5 years ago

The sample app uses httpclient which is deprecated in android 6.0. I think you should switch to HttpUrlConnection instead.

scognito commented 5 years ago

As workaround you can edit the Android Manifest this way. Inside the tag add this tag:

<uses-library
            android:name="org.apache.http.legacy"
            android:required="false" />

See this for detail.

raghunandankavi2010 commented 5 years ago

i have done that already. i opened the issue cause i wanted the authors to port to httpurlconnection.

lebronJ commented 5 years ago

Thanks for reaching us. We have fixed this with PR #53 merged, which replaces outdated httpClient with OkHttp. Please have a try. Feel free to reopen this if you still meet similar problems.