SDK级别26以上的MQTT错误,为什么?

时间:2019-05-24 05:56:02

标签: android mqtt

在Android Oreo及更高版本上运行我的应用程序时,出现MQTT Connection错误。

我已经实现了这个有关HiveMQ的MQTT。这是它的链接- https://www.hivemq.com/blog/mqtt-client-library-enyclopedia-paho-android-service/

错误-     E/AndroidRuntime: FATAL EXCEPTION: MQTT Con: Process: PID: 7190 java.lang.NullPointerException: cancel() called with a null PendingIntent at android.app.AlarmManager.cancel(AlarmManager.java:901) at org.eclipse.paho.android.service.AlarmPingSender.stop(AlarmPingSender.java:86) at org.eclipse.paho.client.mqttv3.internal.ClientComms.shutdownConnection(ClientComms.java:327) at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:608) at java.lang.Thread.run(Thread.java:764)

0 个答案:

没有答案