[英]CoAP Example for android Use Californium
I'm trying to build a CoAP server in android, and i's using californium's example. 我正在尝试在android中构建CoAP服务器,并且正在使用californium的示例。
https://github.com/curioustechizen/Californium/tree/4ace5b85974a0646aaaa6ab43c9314d1c5a438e1 https://github.com/curioustechizen/Californium/tree/4ace5b85974a0646aaaa6ab43c9314d1c5a438e1
But I got error with Http.java
in package ch.ethz.inf.vs.californium.layers
但是我在
Http.java
包中的ch.ethz.inf.vs.californium.layers
错误
it shows 表明
The type org.apache.http.entity.ContentType cannot be resolved. It is indirectly referenced from required .class files
I'm thinking the problem is about the wrong .jar file the library I imported is like this: 我认为问题出在我导入的库的.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
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
hope anyone can tell me whats the problem or how to fix it, and also ask to some open source about CoAP's android example. 希望任何人都可以告诉我问题出在哪里或如何解决,并询问有关CoAP的android示例的一些开源。
I think you are missing a http-components jar there. 我认为您在那里缺少一个http-components jar。 Do you use maven?
您使用Maven吗?
Please note: your fork is too old (2 years). 请注意:您的叉子太旧(2年)。 You can find the actual Californium version at https://eclipse.org/californium/ It does not have android support but I see your fork only removes a lot of files and adds an android manifest at most - so it could be done too.
您可以在https://eclipse.org/californium/上找到实际的Californium版本。它不具有android支持,但是我看到您的fork最多只能删除很多文件并添加一个android清单-因此也可以这样做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.