You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Android 6.0 release removes support for the Apache HTTP client. #1640
Android 6.0 release removes support for the Apache HTTP client。use the HttpURLConnection class instead。
I think it is necessary to add Androidannotations @HttpUrlConnection instead of @HttpsClient
There is no way to inject HttpUrlConnection as it is can be done with HttpClient, because HttpUrlConnection is obtained via calling URL.openConnection() on a specific URL instance.
Activity
han361769045 commentedon Nov 25, 2015
https://developer.android.com/intl/zh-cn/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
WonderCsabo commentedon Nov 25, 2015
There is no way to inject
HttpUrlConnectionas it is can be done withHttpClient, becauseHttpUrlConnectionis obtained via callingURL.openConnection()on a specificURLinstance.dodgex commentedon Nov 25, 2015
@WonderCsabo but maybe we want to emit a warning or even error when using those with android 6 target?
WonderCsabo commentedon Nov 25, 2015
Yeah, we could add a warning when
targetSdkVersion >= 23.WonderCsabo commentedon Nov 25, 2015
And we should issue an error if the
HttpClientclass is not on the compile classpath.... or we could just remove
@HttpsClient...dodgex commentedon Nov 25, 2015
+1 for removing it.
WonderCsabo commentedon Dec 14, 2015
@yDelouis should we remove this annotation?
dodgex commentedon Jan 17, 2016
@WonderCsabo @yDelouis if we decide to remove this, we should do it before 4.0 to not have a post-4.0 breaking change due to removing an annotation