在Android的异步HTTP服务器 [英] Asynchronous Http server in android

查看:124
本文介绍了在Android的异步HTTP服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我米实施的Andr​​oid异步HTTP服务器。我使用的链接code http://hc.apache.org /httpcomponents-core-ga/examples.html (异步HTTP服务器)。虽然编译它,我收到以下错误和应用程序崩溃:

I m implementing an asynchronous HTTP server in Android. I am using the code from link http://hc.apache.org/httpcomponents-core-ga/examples.html (Asynchronous HTTP server).. While compiling it I am getting the following error and application crashes:

java.lang.IncompatibleClassChangeError:org.apache.http.params.SyncBasicHttpParams 

在该行

HttpParams params = new SyncBasicHttpParams();

请让我知道的原因以及如何解决它?

Please let me know the cause and how to resolve it?

我使用从httpcomponents核心-4.3-α1的罐子。

I am using the jars from httpcomponents-core-4.3-alpha1.

感谢您!

推荐答案

有可能会在此线程答案的开始:<一href=\"http://stackoverflow.com/questions/2618573/what-version-of-apache-http-client-is-bundled-in-android-1-6\">What Apache的HTTP客户端版本的Andr​​oid 1.6是捆绑?

There might be a beginning of answer on this thread : What version of Apache HTTP Client is bundled in Android 1.6?

事实上的错误你指出你使用SyncBasicHttpParams类是不符合出货Android上的HttpParams类兼容。你应该尝试在线程表示降级你的Apache库,来4.0.X。

Indeed the error you get states that the SyncBasicHttpParams class you use is not compatible with the HttpParams class shipped in android. You should try to downgrade your apache libs to 4.0.X as indicated in the thread.

这篇关于在Android的异步HTTP服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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