0

i have seen this question

Why Warning:Unable to find optional library: org.apache.http.legacy occurs?

and few more but the problem is not solved , i was using target 23 and i didn't want to , so now when i go back to target 21 i receive this error :

Warning:Unable to find optional library: org.apache.http.legacy

yes i have the optional.json file , yes i have try'd to put the apache in my lib folder but this error still occurs i am stuck on this for far to long .

Community
  • 1
  • 1
Jesus Dimrix
  • 4,378
  • 4
  • 28
  • 62

1 Answers1

5

Just add this code to your gradle

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    useLibrary 'org.apache.http.legacy'
Mr Robot
  • 1,747
  • 6
  • 35
  • 67