* Which version of the SDK are you using? SDK 24.3.4
* Which Android build are you using? (e.g. MPA44G) Emulator SDK 23
* What device are you using? Emulator
* What steps will reproduce the problem? (Please provide the minimal reproducible test case.) Compile volley library
* What is the expected output? It compiles
* What do you see instead? It doesn't compile due to the lack of apache http classes
* Relevant logcat output. None
Comment #1
Posted on Sep 1, 2015 by Massive ElephantHi, Thank you for reporting this issue. We have passed this on to the development team and will update this issue with more information as it becomes available.
Comment #2
Posted on Sep 3, 2015 by Massive ElephantIssue 2975 has been merged into this issue.
Comment #3
Posted on Sep 22, 2015 by Massive Elephant(No comment was entered for this change.)
Comment #4
Posted on Sep 23, 2015 by Massive ElephantThe docs here: https://developer.android.com/training/volley/index.html suggest using the version in AOSP. That version does appear to have dependencies on org.apache.http Some info here: https://developer.android.com/preview/behavior-changes.html#behavior-apache-http-client And: http://stackoverflow.com/questions/31350816/volley-in-android-m-developer-preview-org-apache-http-cannot-be-resolved
Assuming the developer is using gradle, following the advice in the first doc should mean that the developer compiles against the prebuilt org.apache.http.legacy.jar in the SDK, which should resolve their compilation issues. I believe their application manifest will need: to run on M devices.
Comment #5
Posted on Sep 23, 2015 by Quick Lion4 What the hell you are saying? I'm using AOSP version and you can look at HurlStack.java:
import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.ProtocolVersion; import org.apache.http.StatusLine; import org.apache.http.entity.BasicHttpEntity; import org.apache.http.message.BasicHeader; import org.apache.http.message.BasicHttpResponse; import org.apache.http.message.BasicStatusLine;
so what?????? The library doesn't compile at all and it's based on deprecated code. Fix asap.
Comment #6
Posted on Sep 25, 2015 by Massive MonkeyThe part at the bottom is more critical than the part at the top.
The first half is an acknowledgement that things have changed in Android and that the latest version of volley is still dependent on apache. I am not involved with volley but I'm guessing it is unlikely to change given the volley public API exposes it.
The second part provides guidance on how to resolve the compilation issue. I have not tried this, personally.
Comment #7
Posted on Sep 25, 2015 by Quick LionIt's only a workaround, if this is the solution the message is go to OkHttp instead of using a library that use deprecated code and it's a Google library....crazy. I don't understand what the public api are involved. You can change internally without change the api and if you don't want to change (if really needed) it means that the library is dead.
Comment #8
Posted on Sep 28, 2015 by Massive MonkeyCorrection:
is not required yet, but may be in a future release of Android.
All you need to use Volley should be to adjust the build classpath to include the "org.apache.http.legacy.jar".
Comment #9
Posted on Oct 16, 2015 by Massive ElephantComment deleted
Comment #10
Posted on Oct 16, 2015 by Massive Elephant@playappassistance:
Please try the steps suggested by nfuller@google.com in comment #8 and let us know whether it is solving your problem.
Comment #11
Posted on Oct 16, 2015 by Quick LionI switched to okhttp. I don't build my business on deprecated code, it's ridiculous.
Comment #12
Posted on Oct 19, 2015 by Massive Elephant(No comment was entered for this change.)
Comment #13
Posted on Dec 2, 2015 by Massive HorseComment deleted
Comment #14
Posted on Dec 2, 2015 by Helpful ElephantHi! I have customized Google's volley (as a module in my project) and uploaded to https://github.com/ngocchung/volleynoapache, please take a look. Please note that, however, it has not been fully tested for all cases. I have just tested with simple GET, POST requests.
Comment #15
Posted on Dec 9, 2015 by Happy PandaWhy was this defect closed? Volley source in AOSP still requires Apache HttpClient, and is holding us up in removing the legacy library from our app...
Status: Closed
Labels:
Type-Defect
Release-M
Defect-24287774