Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

Unable to import HttpClient and HttpPost Libraries into ServletPostAsyncTask #62

Open
troy21688 opened this issue Jan 22, 2016 · 6 comments
Assignees

Comments

@troy21688
Copy link

When I add the ServletPostAsyncTask class, I am unable to import the relevant libraries. I read in Stack Overflow that I could update my build.grade with the following:

useLibrary 'org.apache.http.legacy'

However, when doing so, it looks like the HttpClient and HttpPost libraries are deprecated.

Please let me know what I am doing wrong and how I should proceed.

@BazM01
Copy link

BazM01 commented Apr 11, 2017

Having the same problem after updating Android Studio.

@patflynn
Copy link
Contributor

@loosebazooka
@akerekes

@loosebazooka
Copy link
Contributor

loosebazooka commented Apr 18, 2017

This might have something to do with Android's dependency resolution, which seems to get messed up every now and then?

@loosebazooka
Copy link
Contributor

Your ServeltPostAsyncTask will have to be updated to use HttpUrlConnection instead of HttpClient/Post.

@BazM01
Copy link

BazM01 commented Apr 18, 2017

Is there an example of how to do this?

I followed the instructions on on the tutorial https://cloud.google.com/appengine/docs/standard/java/endpoints/helloendpoints-android-studio

As I said, this worked until I updated android studio. I have since tried following the instructions on the link about migrating to 2.0 but so far only seemed to make things worse.

@loosebazooka
Copy link
Contributor

Okay, sorry I bit out of date on this guide. It looks like it's using HttpUrlConnection already since this change c4c0486

if that's not your issue, can you explain what it is?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants