can't use HttpPost in Android Studio after successful Gradle sync -
i'm trying use httppost did in past in android. realize has been removed recent android versions. following solutions on similar stackoverflow question, added gradle dependencies:
compile 'org.apache.httpcomponents:httpcore:4.4.1' compile 'org.apache.httpcomponents:httpclient:4.5'
after gradle sync complained of no errors, still cannot import httppost program. in fact, org.apache.http.client.methods package not resolve @ all.
i tried apache httpclient website suggested, use instead in gradle dependencies:
compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
once again, sync went fine, , time package resolved, not httppost program.
i'd grateful suggestions.
just add line in build.gradle
inside android plugin :
uselibrary 'org.apache.http.legacy'
Comments
Post a Comment