Kura error : The type javax.microedition.io.StreamConnection cannot be resolved [message #1764126] |
Thu, 25 May 2017 08:09  |
Eclipse User |
|
|
|
Hi.
I have a problem with javax.microedition.io.StreamConnection.
I wrote module for gpio comunnication inspired by your serial example, but one line shows error :
CommConnection conn;
if (this.conn != null) {
try {
this.conn.close(); //this line shows error
logger.info("Connection closed");
} catch (IOException e) {
e.printStackTrace();
}
this.conn = null;
When I export project like deployable plug - ins and fragments, in log I have:
this.conn.close();
^^^^^^^^^^^^^^^^^
The type javax.microedition.io.StreamConnection cannot be resolved. It is indirectly referenced from required .class files
I tried with adding bluecove-2.1.0.jar to build path, but still no change.
Whole method that contains error line :
public void doPublish() {
try {
if (this.mCloudClient != null) {
KuraPayload payload = new KuraPayload();
payload.addMetric("counter", counter);
this.mCloudClient.publish("sound", payload, 0, false);
this.counter++;
if (this.counter == 4) {
if (this.conn != null) {
try {
this.conn.close();
logger.info("Connection closed");
} catch (IOException e) {
e.printStackTrace();
}
this.conn = null;
}
}
}
}
catch (Exception e) {
e.printStackTrace();
}
}
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 6.82380 seconds