A customer has raised an issue whereby aNoClassDefFoundError is thrown because of the use of java.nio.charset.StandardCharset. Full stack trace:
Fatal Exception: java.lang.NoClassDefFoundError
java.nio.charset.StandardCharsets
io.ably.lib.http.HttpUtils.encodeURIComponent (HttpUtils.java:150)
io.ably.lib.realtime.ChannelBase.<init> (ChannelBase.java:1096)
io.ably.lib.realtime.Channel.<init> (Channel.java:14)
io.ably.lib.realtime.AblyRealtime$InternalChannels.get (AblyRealtime.java:164)
io.ably.lib.realtime.AblyRealtime$InternalChannels.get (AblyRealtime.java:147)
com.REDACTED.conversational.managers.ChannelManager$subscribeToProspect$$inlined$let$lambda$1.run (ChannelManager.kt:200)
java.lang.Thread.run (Thread.java:856)
This is essentially the same problem as in issue #332.
This issue is down to the fact that StandardCharsets requires API level 19 or higher. Looking at the codebase StandardCharsets is used in lib/http/HttpUtils.java:150 and lib/types/DecodingContext.java:21. In both cases this can be resolved by replacing StandardCharsets.UTF_8 with Charset.forName("UTF-8") as was done in #332.
A customer has raised an issue whereby a
NoClassDefFoundErroris thrown because of the use ofjava.nio.charset.StandardCharset. Full stack trace:This is essentially the same problem as in issue #332.
This issue is down to the fact that
StandardCharsetsrequires API level 19 or higher. Looking at the codebaseStandardCharsetsis used in lib/http/HttpUtils.java:150 and lib/types/DecodingContext.java:21. In both cases this can be resolved by replacingStandardCharsets.UTF_8withCharset.forName("UTF-8")as was done in #332.