Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't subscribe to topic on Android 14 #498

Open
ZouZLong opened this issue Oct 26, 2023 · 10 comments
Open

Can't subscribe to topic on Android 14 #498

ZouZLong opened this issue Oct 26, 2023 · 10 comments

Comments

@ZouZLong
Copy link

Is this project compatible with Android 14?

@sahityadubey
Copy link

sahityadubey commented Nov 17, 2023

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
Copy link
Author

ZouZLong commented Nov 17, 2023 via email

@mayzs
Copy link

mayzs commented Jan 11, 2024

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

@ZouZLong
Copy link
Author

ZouZLong commented Jan 11, 2024 via email

@wboykron
Copy link

适配到 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
Copy link
Author

ZouZLong commented Jan 29, 2024 via email

@mayzs
Copy link

mayzs commented Jan 29, 2024

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

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

mayzs commented Jan 29, 2024

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants