I'm trying to use HttpPost as I did in the past in Android. I realize that it has been removed from recent Android versions. Following the solutions on a similar StackOverflow question, I added this to my Gradle dependencies:
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
After a Gradle sync that complained of no errors, I still cannot import the HttpPost program. In fact, the org.apache.http.client.methods package does not resolve at all.
I also tried what the Apache HttpClient website suggested, which was to use this instead in my Gradle dependencies:
compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
Once again, the sync went fine, and this time the package resolved, but not the HttpPost program.
I'd be grateful for any suggestions.