0

I updated my SDK and Android studio is not able to recognise 'org.apache.http.legacy'library.

There is not org.apache.http.legacy.jar update which should be in /platforms/android-23/optional path after update.

I am not able to gradle sync my project.

Note: I am using android useLibrary 'org.apache.http.legacy' in my build.gradle

StepUp
  • 36,391
  • 15
  • 88
  • 148
  • Try [This answer it may be work for you](http://stackoverflow.com/questions/30856785/how-to-add-apache-http-api-legacy-as-compile-time-dependency-to-build-grade-fo) – Dhaval Solanki Apr 07 '16 at 06:51

1 Answers1

0

Try to write this under useLibrary 'org.apache.http.legacy' line in your build.gradle like this:

useLibrary 'org.apache.http.legacy'
packagingOptions {
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
Bui Quang Huy
  • 1,784
  • 2
  • 17
  • 50