eclipse-paho / eclipse-paho/paho.mqtt.java

java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets Crash

Open
#674 5 comments 4 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

Please fill out the form below before submitting, thank you!

- [ ] Bug exists Release Version 1.2.0 ( Master Branch)
- [x] Bug exists in MQTTv3 Client on Snapshot Version 1.2.1-SNAPSHOT (Develop Branch)
- [ ] Bug exists in MQTTv5 Client on Snapshot Version 1.2.1-SNAPSHOT (Develop Branch)

If this is a bug regarding the Android Service, please raise the bug here instead: https://github.com/eclipse/paho.mqtt.android/issues/new

When I use Android 4.1, Paho Mqtt Client's version is 1.2.1, crash

I see org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage have these code:

protected static final Charset STRING_ENCODING = StandardCharsets.UTF_8;

I find the StandardCharsets support min Android API is 19 (Android 4.4),
so how to solve this problem when i use Paho Mqtt Version 1.2.1 and Android 's version is Android 4.0 or up

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.