I think I have a fundamental misunderstanding (probably not appropriate to
discuss on this forum I guess) or I am reading wrong our incomplete
articles or documents or not reading enough.
I read that a class file contains Java byte code to be executed on jvm and
also that Java byte code in jar files cannot be executed by Android, but
that Java classes are compiled into a proprietory byte code to run on
dalvic not jvm.
This led me to understand that I must only add dependant items which
indicate (by their name?) they are specifically for Android.
However HttpClient 5.0 and HttpCore 5.0 do not seem to clearly indicate
they are Android byte code only. Are they?
On March 26, 2019 08:02:32 Oleg Kalnichevski <ol...@apache.org> wrote:
On Tue, 2019-03-26 at 01:26 +0000, Andrew Hardy wrote:
Hi,
Thank you so much for all your work in porting
org.apache.httpcomponents:httpclient to Android. I appreciate the
benefits you are making available. I am in the process of up
versioning
some old Android code that used httpclient and I am swapping for you
Android port. I have run into a little difficulty and I wonder if
you
would be so kind as to help me understand where I am going wrong.
I am using the following dependancies:
implementation 'org.apache.httpcomponents:httpclient-
android:4.3.5.1'
implementation 'org.apache.httpcomponents.core5:httpcore5:5.0-
beta7'
However, there are still 7 Classes which I used in my old code which
I
cannot now find in either httpclient-android nor httpcore5, either
same
named or renamed. I would be very grateful if you could point me in
the
right direction
import org.apache.http.client.ClientProtocolException; // cannot find
in
httpclient-android but is in original client 4.0
import org.apache.http.client.HttpClient; // cannot find in
httpclient-android but is in original client 4.0
import org.apache.http.client.protocol.ClientContext; // cannot find
in
httpclient-android but is in original client 4.0
import org.apache.http.cookie.Cookie; // cannot find in
httpclient-android but is in original client 4.5
import org.apache.http.client.CookieStore; // cannot find in
httpclient-android but is in original client 4.0
import org.apache.http.impl.client.DefaultHttpClient; // cannot find
in
httpclient-android but is in original client 4.5
import org.apache.http.protocol.HTTP; // cannot find
Many thanks indeed.
Those are HttpClient classes. Please use HttpClient 5.0, not just
HttpCore 5.0
Here is a HttpClient 5.0 migration guide that you may find useful.
https://ok2c.github.io/httpclient-migration-guide/
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org
Sent with AquaMail for Android
https://www.mobisystems.com/aqua-mail
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org