paho.mqtt.android icon indicating copy to clipboard operation
paho.mqtt.android copied to clipboard

Can't subscribe to topic on Android 14

Open ZouZLong opened this issue 2 years ago • 13 comments

Is this project compatible with Android 14?

ZouZLong avatar Oct 26 '23 11:10 ZouZLong

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

sahityadubey avatar Nov 17 '23 15:11 sahityadubey

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

ZouZLong avatar Nov 17 '23 15:11 ZouZLong

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

mayzs avatar Jan 11 '24 09:01 mayzs

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

ZouZLong avatar Jan 11 '24 09:01 ZouZLong

适配到 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,大佬如何解决?

wboykron avatar Jan 29 '24 07:01 wboykron

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

ZouZLong avatar Jan 29 '24 07:01 ZouZLong

适配到 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 进行引用

mayzs avatar Jan 29 '24 07:01 mayzs

适配到 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

wboykron avatar Jan 29 '24 07:01 wboykron

适配到 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方式

mayzs avatar Jan 29 '24 08:01 mayzs

适配到 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) 

wboykron avatar Jan 29 '24 08:01 wboykron