Android的API 23删除的包 [英] Android API 23 Removed packages

查看:152
本文介绍了Android的API 23删除的包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是org.apache.http的最佳替代?

因为他们说,这在Android的API差异报告。

在删除API包23

  org.apache.commons.logging
org.apache.http
org.apache.http.auth
org.apache.http.auth.params
org.apache.http.client
org.apache.http.client.entity
org.apache.http.client.methods
org.apache.http.client.params
org.apache.http.client.protocol
org.apache.http.client.utils
org.apache.http.conn.params
org.apache.http.conn.routing
org.apache.http.conn.util
org.apache.http.cookie
org.apache.http.cookie.params
org.apache.http.entity
org.apache.http.impl
org.apache.http.impl.auth
org.apache.http.impl.client
org.apache.http.impl.conn
org.apache.http.impl.conn.tsccm
org.apache.http.impl.cookie
org.apache.http.impl.entity
org.apache.http.impl.io
org.apache.http.io
org.apache.http.message
org.apache.http.protocol
org.apache.http.util


解决方案

像黑带说,HttpURLConnection类是默认的替代HttpClient的。如果您仄这里(末) ,您可能会看到多数民众赞成在那里他们会集中自己的资源。

不过,值得一提的是,正在使用的一些常见的API,并很好地工作,如果你的应用程序的重点不是网页浏览,而只是使用互联网来获取IMGS,jsons,文本等。

我建议凌​​空。它看起来像它会很长一段时间(根据我的意见)的支持,并通过谷歌本身的支持。

What is the best replacement for org.apache.http ?

since they say this in Android API Differences Report .

Removed Packages in API 23

org.apache.commons.logging   
org.apache.http  
org.apache.http.auth     
org.apache.http.auth.params  
org.apache.http.client   
org.apache.http.client.entity    
org.apache.http.client.methods   
org.apache.http.client.params    
org.apache.http.client.protocol  
org.apache.http.client.utils     
org.apache.http.conn.params  
org.apache.http.conn.routing     
org.apache.http.conn.util    
org.apache.http.cookie   
org.apache.http.cookie.params    
org.apache.http.entity   
org.apache.http.impl     
org.apache.http.impl.auth    
org.apache.http.impl.client  
org.apache.http.impl.conn    
org.apache.http.impl.conn.tsccm  
org.apache.http.impl.cookie  
org.apache.http.impl.entity  
org.apache.http.impl.io  
org.apache.http.io   
org.apache.http.message  
org.apache.http.protocol     
org.apache.http.util

解决方案

Like Blackbelt stated, HttpURLConnection is the default replacement for the HTTPClient. If you chek here (at the end), you may see that thats where they will be focusing their resources.

However, is worth mentioning that some common APIs are being used, and works nicely if the focus of your app is not web browsing, but rather just using internet to fetch imgs, jsons, texts, etc.

I recommend Volley. It does look like it will be supported for a long time (based on my opinion), and is supported by google itself.

这篇关于Android的API 23删除的包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆