【发布时间】:2015-04-22 15:34:48
【问题描述】:
我正在尝试在 android 中构建一个 CoAP 服务器,并且我正在使用 californium 的示例。
https://github.com/curioustechizen/Californium/tree/4ace5b85974a0646aaaa6ab43c9314d1c5a438e1
但我在包ch.ethz.inf.vs.californium.layers 中遇到Http.java 错误
它显示
The type org.apache.http.entity.ContentType cannot be resolved. It is indirectly referenced from required .class files
我认为问题出在错误的 .jar 文件上 我导入的库是这样的:
apache-mimne4j.core-0.7.2.jar californium-0.18.7-final.jar commons-codec-1.6.jar commons-io-2.4.jar commons-logging-1.1.1.jar google-http-client-1.10.3-beta.jar google-oauth-client-1.10.1-beta.jar gson-2.1.jar guava-11.0.1.jar httpclient-4.2.1.jar httpclient-4.3.2.jar httpcore-nio-4.2.1.jar jsr305-1.3.9.jar junit-3.8.1.jar junit-4.8.1.jar mockito-core-1.8.5.jar
希望任何人都可以告诉我问题出在哪里或如何解决它,也可以向一些开源人士询问 CoAP 的 android 示例。
【问题讨论】:
-
你可以试试nCoap。参考请看github.com/okleine/spitfirefox。
标签: java android eclipse jar coap