eclipse / paho.mqtt.android

MQTT Android
Other
2.92k stars 883 forks source link

Can't subscribe to topic on Android 14 #498

Open ZouZLong opened 11 months ago

ZouZLong commented 11 months ago

Is this project compatible with Android 14?

sahityadubey commented 10 months ago

No, this repo is not supported anymore.

To resolve android14 issue follow this document https://developer.android.com/about/versions/14/changes/schedule-exact-alarms

and to give it a quick try your code is working or not enable Alarm and reminder from app info https://developer.android.com/training/scheduling/alarms#exact-user-grant

ZouZLong commented 10 months ago

这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。

mayzs commented 8 months ago

适配到 Android 14 , https://github.com/mayzs/paho.mqtt.android

ZouZLong commented 8 months ago

这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。

wboykron commented 8 months ago

适配到 Android 14 , https://github.com/mayzs/paho.mqtt.android

引入出现这个错误Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not find :unspecified:. Required by: project :app > io.github.mayzs:paho.mqtt.android:1.1.2,大佬如何解决?

ZouZLong commented 8 months ago

这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。

mayzs commented 8 months ago

适配到 Android 14 , https://github.com/mayzs/paho.mqtt.android

引入出现这个错误Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not find :unspecified:. Required by: project :app > io.github.mayzs:paho.mqtt.android:1.1.2,大佬如何解决?

你项目中 gradle版本低, 可以使用 io.github.mayzs:paho.mqtt.android:1.1.2@aar 进行引用

wboykron commented 8 months ago

适配到 Android 14 , https://github.com/mayzs/paho.mqtt.android

引入出现这个错误Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not find :unspecified:. Required by: project :app > io.github.mayzs:paho.mqtt.android:1.1.2,大佬如何解决?

你项目中 gradle版本低, 可以使用 io.github.mayzs:paho.mqtt.android:1.1.2@aar 进行引用 引入成功了,连接就出现: java.lang.IllegalArgumentException: foregroundServiceType 0x00000001 is not a subset of foregroundServiceType attribute 0x00000000 in service element of manifest file

mayzs commented 8 months ago

适配到 Android 14 , https://github.com/mayzs/paho.mqtt.android

引入出现这个错误Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not find :unspecified:. Required by: project :app > io.github.mayzs:paho.mqtt.android:1.1.2,大佬如何解决?

你项目中 gradle版本低, 可以使用 io.github.mayzs:paho.mqtt.android:1.1.2@aar 进行引用 引入成功了,连接就出现: java.lang.IllegalArgumentException: foregroundServiceType 0x00000001 is not a subset of foregroundServiceType attribute 0x00000000 in service element of manifest file

参考 sample中 manifest 配置Service方式

wboykron commented 8 months ago

适配到 Android 14 , https://github.com/mayzs/paho.mqtt.android

引入出现这个错误Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not find :unspecified:. Required by: project :app > io.github.mayzs:paho.mqtt.android:1.1.2,大佬如何解决?

你项目中 gradle版本低, 可以使用 io.github.mayzs:paho.mqtt.android:1.1.2@aar 进行引用 引入成功了,连接就出现: java.lang.IllegalArgumentException: foregroundServiceType 0x00000001 is not a subset of foregroundServiceType attribute 0x00000000 in service element of manifest file

参考 sample中 manifest 配置Service方式

感谢,能连接上了,但是心跳时间后就不停重连,报错如下:2024-01-29 16:34:22.091 15893-18934/com.ynnskj.dinggong.member D/AlarmPingSender: Unregister alarmreceiver to MqttServiceGID_dingo@@@PASS0000003bc99ff84eb89d281c5b2b 2024-01-29 16:34:22.127 15893-15893/com.ynnskj.dinggong.member E/mqtt: callback connectionLost 已断开连接 (32109) - java.io.EOFException at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:197) at java.lang.Thread.run(Thread.java:1012) Caused by: java.io.EOFException at java.io.DataInputStream.readByte(DataInputStream.java:275) at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:92) at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:137) at java.lang.Thread.run(Thread.java:1012)