一周前我在 android 上工作,我必须在我的 Appy android 中使用 MQTT 的服务器(如 mosquitto);因为我们将使用 Delphy MQTT 服务器。Android 的手机是 2.3.6 中的 Galaxy Young ... API : 9
为了学习如何使用它,我测试了 Dale Lane 的 Mosquitto for android 但是,一天之后,我发现我可以在论坛中做些什么...... Dale Lane 的链接: http: //dalelane.co.uk/博客/?p=1599
还有我的 LogCat:
10-01 10:34:50.203 17844-17879/org.mosquitto.android.mqttdemo
W/Settings: Setting android_id has moved from
android.provider.Settings.System to android.provider.Settings.Secure,
returning read-only value.
10-01 10:34:50.250 17844-17879/org.mosquitto.android.mqttdemo
W/dalvikvm: threadid=11: thread exiting with uncaught exception
(group=0x40018578)
10-01 10:34:50.375 17844-17879/org.mosquitto.android.mqttdemo
E/AndroidRuntime: FATAL EXCEPTION: MQTTservice
java.lang.NoClassDefFoundError: javax.microedition.io.Connector
at com.ibm.mqtt.midp.MqttMidpSocket.setConnection(Unknown Source)
at com.ibm.mqtt.Mqtt.tcpipConnect(Unknown Source)
at com.ibm.mqtt.MqttBaseClient.doConnect(Unknown Source)
at com.ibm.mqtt.MqttBaseClient.connect(Unknown Source)
at com.ibm.mqtt.MqttClient.connect(Unknown Source)
at com.ibm.mqtt.MqttClient.connect(Unknown Source)
at org.mosquitto.android.powerviewer.MQTTService.connectToBroker(MQTTService.java:651)
at org.mosquitto.android.powerviewer.MQTTService.handleStart(MQTTService.java:285)
at org.mosquitto.android.powerviewer.MQTTService$2.run(MQTTService.java:209)
at java.lang.Thread.run(Thread.java:1019)
如果有人可以帮助我,谢谢并为我的英语感到抱歉;)