我想在android中构建一个CoAP服务器,并且我使用了cal的例子。Android的使用Californium的CoAP示例
https://github.com/curioustechizen/Californium/tree/4ace5b85974a0646aaaa6ab43c9314d1c5a438e1
但我在包Http.java
遇到错误ch.ethz.inf.vs.californium.layers
它显示
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核-1.8.5.jar
希望任何人都可以告诉我最新的问题或如何解决问题,也可以询问一些关于CoAP的android示例的开源代码。
你可以试试nCoap。参考请看看https://github.com/okleine/spitfirefox。 –