Jesus Dimrix
Jesus Dimrix

Reputation: 4578

Warning:Unable to find optional library: org.apache.http.legacy occurs in target 21

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 .

Upvotes: 0

Views: 3763

Answers (1)

Mr Robot
Mr Robot

Reputation: 1747

Just add this code to your gradle

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    useLibrary 'org.apache.http.legacy'

Upvotes: 5

Related Questions