-
Notifications
You must be signed in to change notification settings - Fork 465
Open
Labels
type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Hi,
we have problems with the latest version of your library in devices running Android 4.3 (API 18) or lower. StandardCharsets was added in Android API 19 so any call to methods using that (for example, StringUtils.getBytesUtf8 or StringUtils.newStringUtf8) causes a crash in our app.
Environment details
- OS: Android API < 19
- google-http-java-client version: 1.28
Stacktrace
java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets
at com.google.api.client.util.StringUtils.getBytesUtf8(StringUtils.java:52)
at com.google.api.client.json.webtoken.JsonWebSignature.signUsingRsaSha256(JsonWebSignature.java:636)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:388)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:494)
at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:217)
at com.google.api.client.googleapis.batch.BatchRequest$BatchInterceptor.intercept(BatchRequest.java:281)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:911)
at com.google.api.client.googleapis.batch.BatchRequest.execute(BatchRequest.java:233)
at our.app.PubSubManager.sendTopic(PubSubManager.java:100)
at java.lang.Thread.run(Thread.java:841)
Any additional information below
https://developer.android.com/reference/java/nio/charset/StandardCharsets.html
Thanks!
durey, insightfulfellow and abaker
Metadata
Metadata
Assignees
Labels
type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.