Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

can't find referenced class org.apache.http.* #80

Closed
ralph-bergmann opened this issue Aug 20, 2015 · 17 comments
Closed

can't find referenced class org.apache.http.* #80

ralph-bergmann opened this issue Aug 20, 2015 · 17 comments
Assignees
Milestone

Comments

@ralph-bergmann
Copy link

With Android M / 6 the Apache HTTP stuff is gone but the SDK uses it a lot.

It can be fixed with

android {
    useLibrary 'org.apache.http.legacy'
}

but I prefer a cleaner way without dependencies to a deprecated lib :-)

Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.message.BasicNameValuePair
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.message.BasicNameValuePair
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.protocol.HTTP
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.CrashManager: can't find referenced class org.apache.http.NameValuePair
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.HttpResponse
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.util.EntityUtils
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.ClientProtocolException
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.ClientProtocolException
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.message.BasicNameValuePair
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.message.BasicNameValuePair
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.protocol.HTTP
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpGet
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpGet
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.HttpResponse
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.util.EntityUtils
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.HttpEntity
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.HttpResponse
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.ClientProtocolException
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpGet
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.NameValuePair
Warning: net.hockeyapp.android.tasks.LoginTask: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.message.BasicNameValuePair
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.message.BasicNameValuePair
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.protocol.HTTP
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPut
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPut
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPut
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.HttpResponse
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.util.EntityUtils
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.HttpResponse
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.StatusLine
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.ClientProtocolException
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.ClientProtocolException
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.NameValuePair
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.NameValuePair
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.NameValuePair
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPut
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpGet
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpGet
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.HttpResponse
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.util.EntityUtils
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.StatusLine
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.HttpEntity
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPut
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.HttpResponse
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.ClientProtocolException
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.NameValuePair
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.NameValuePair
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.HttpEntity
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPost
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpPut
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.HttpResponse
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.ClientProtocolException
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.NameValuePair
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.HttpResponse
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.HttpEntity
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.ClientProtocolException
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.methods.HttpGet
Warning: net.hockeyapp.android.tasks.SendFeedbackTask: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.params.BasicHttpParams
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.params.BasicHttpParams
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.HttpVersion
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.params.HttpProtocolParams
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.params.HttpProtocolParams
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.params.CoreProtocolPNames
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.conn.scheme.Scheme
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.conn.scheme.PlainSocketFactory
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.conn.scheme.Scheme
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.HttpVersion
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.params.HttpProtocolParams
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.conn.scheme.PlainSocketFactory
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
Warning: net.hockeyapp.android.utils.ConnectionManager: can't find referenced class org.apache.http.client.HttpClient
Warning: net.hockeyapp.android.utils.SimpleMultipartEntity: can't find referenced class org.apache.http.message.BasicHeader
Warning: net.hockeyapp.android.utils.SimpleMultipartEntity: can't find referenced class org.apache.http.message.BasicHeader
Warning: net.hockeyapp.android.utils.SimpleMultipartEntity: can't find referenced class org.apache.http.HttpEntity
Warning: net.hockeyapp.android.utils.SimpleMultipartEntity: can't find referenced class org.apache.http.Header
Warning: net.hockeyapp.android.utils.SimpleMultipartEntity: can't find referenced class org.apache.http.Header
@matthiaswenz
Copy link
Contributor

Thanks for pointing this out. We're already working on this and other changes necessary for Android 6.0 - see #77.

@matthiaswenz matthiaswenz self-assigned this Aug 20, 2015
@matthiaswenz matthiaswenz added this to the 3.6 milestone Aug 20, 2015
@ZacSweers
Copy link
Contributor

This should be a high priority issue, because including the legacy library is no small thing when APK size is considered (2MB after proguard 😨)

@ZacSweers
Copy link
Contributor

One more to add to @the4thfloor's list:

Warning: net.hockeyapp.android.utils.SimpleMultipartEntity: can't find superclass or interface org.apache.http.HttpEntity

@matthiaswenz
Copy link
Contributor

Thanks @hzsweers as well. Let me clarify: We are not aiming at targeting the legacy library but replacing the mentioned code with either HttpUrlConnection/Volley/..., whatever seems feasible for the task.

@ZacSweers
Copy link
Contributor

I figured, just explaining why the legacy library wasn't the best option either :)

Volley will give you the same problems for the time being unfortunately since it also uses apache stuff under the hood. HttpUrlConnection seems like the minimal impact route, but if you're open to using a library, I'd recommend using OkHttp. It's what powers UrlConnection on Lollipop+, and is pretty widely used. Add in its modernity, robustness, and nice API, I'd say it's worth it. I'd even offer to do the pull request myself if you're open to it!

@matthiaswenz
Copy link
Contributor

Thanks for the suggestion of OkHttp - but it requires Android 2.3 minimum and I'm not quite sure we're ready for that. API looks good, though.

@ZacSweers
Copy link
Contributor

Why not? Using 2.3 as a minimum covers 99.7% of all devices. If that's not
enough to bump your minSdk, what is...?

For reference:
https://developer.android.com/about/dashboards/index.html#Platform

On Sat, Aug 22, 2015, 4:10 PM Mat notifications@github.com wrote:

Thanks for the suggestion of OkHttp - but it requires Android 2.3 minimum
and I'm not quite sure we're ready for that. API looks good, though.


Reply to this email directly or view it on GitHub
#80 (comment)
.

@ralph-bergmann
Copy link
Author

But if it depends on OkHttp all projects depend on it too :-(

@ZacSweers
Copy link
Contributor

That's true, but it might be worth the tradeoff. I only suggested it since @ranterle seemed open to using another library by mentioning Volley. OkHttp has a fairly minimal footprint. Its classes.dex is only 300kB, and that would only get smaller with proguard.

@matthiaswenz
Copy link
Contributor

We're not only looking for Android versions on Google Play in that regard, that's why I'm not sure to say we can go 2.3 minimum.

@ZacSweers
Copy link
Contributor

Where else are you looking? Google Play should be a fairly optimistic
measurement for pre-2.3 devices. If anything, most developers see even
lower usage of pre-4.0 devices.

On Sun, Aug 23, 2015, 5:52 AM Mat notifications@github.com wrote:

We're not only looking for Android versions on Google Play in that regard,
that's why I'm not sure to say we can go 2.3 minimum.


Reply to this email directly or view it on GitHub
#80 (comment)
.

@ghost
Copy link

ghost commented Aug 24, 2015

We will not add dependencies which all projects using our SDK will also have to adopt. If you are doing something like that in an internal library, this might be ok to do, but not in an SDK that is used in thousands of applications.

We will fix the warnings as soon as possible.

@ZacSweers
Copy link
Contributor

Then don't. I chimed in about OkHttp because @ranterle suggested Volley as an option, so it was fair to assume at the time that 3rd party options were ok. When he said 2.3 wasn't a viable minimum, and that you don't use Google's OS version statistics, I was curious to find out why. Your comment felt both dismissive and condescending.

You preach good SDK maintanance, but this SDK has limped along for some time now with minimal work (handful of commits/month). On top of this, it runs into the same issues again and again while barely ever releasing fixes for them. Last year you didn't have a Lollipop-compatible release until several months (December) after its release. The exact same thing happened this year with the M preview. Now you're breaking builds because you didn't address something that was announced months ago. It's frustrating for developers that depend on your SDK, and to see how dismissive you were in your comment for merely discussing solutions in your issue tracker is disappointing to see.

This isn't to knock the two primary maintainers, they've both been helpful when I've contributed in the past. However, this comes across as a part time project with no full time maintainers. Your iOS SDK is very well maintained and updated often, why can't Android get the same level of attention?

@ashtom
Copy link
Member

ashtom commented Sep 6, 2015

Thanks for the feedback, we definitely appreciate it. We released a new version of our Android SDK just yesterday, see here:
http://hockeyapp.net/blog/2015/09/04/hockeysdk-android-3-6-beta-1-release-notes.html

Both our iOS and Android SDK are currently in beta and our philosophy is that we won't release a final version before Apple and Google have announced the respective final version of their OS. In 2014, our Android SDK got significantly less feedback than our iOS SDK while many customers had a hard requirement on supporting old Android versions. My impression is that this has recently changed with more pull requests, open & closed issues, and a more open communication (like your feedback above). We are definitely commited to the Android community and plan to ship the final release of 3.6 soon as well as another major release later this year.

@matthiaswenz
Copy link
Contributor

3.6.0 was released yesterday (blog post coming up), closing this.

@thuytrinh
Copy link

@ranterle This seems to be no longer working https://stackoverflow.com/a/50779232/2563009.

@guperrot
Copy link
Collaborator

The hockey SDK removed apache http client a long time ago and is using URLConnection directly now so this stack overflow link does not apply to the current version of the SDK.

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

6 participants