Aws-sdk-android: NoClassDefFoundError on StandardCharsets for API 18 and below

Created on 10 May 2016  Â·  5Comments  Â·  Source: aws-amplify/aws-sdk-android

Hi!
The documentation says that AWS SDK supports Android API 10+, but two classes (https://github.com/aws/aws-sdk-android/search?utf8=✓&q=StandardCharsets) uses StandardCharset that is only available from 19 (http://developer.android.com/reference/java/nio/charset/StandardCharsets.html)

Bug

Most helpful comment

This:
StandardCharsets.UTF_8
should be replaced with:
Charset.forName("UTF-8")

All 5 comments

This:
StandardCharsets.UTF_8
should be replaced with:
Charset.forName("UTF-8")

@adelpuva Thanks for reporting this. We are aware of this issue and have a fix for it (as pointed out by @danielesegato). Stay tuned for the next release.

@adelpuva This is fixed in v2.2.16. For detailed changes, please refer to the change log.

Thank you!

In the last SDK (2.3.0) is also used StandardCharsets class in _CognitoUser.java_:

srpAuthResponses.put("PASSWORD_CLAIM_SIGNATURE", new String(Base64.encode(hmac), StandardCharsets.UTF_8));

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pedronveloso picture pedronveloso  Â·  3Comments

shabana0508 picture shabana0508  Â·  3Comments

nsadiq-radpits picture nsadiq-radpits  Â·  3Comments

chorniyn picture chorniyn  Â·  3Comments

cmbaykal picture cmbaykal  Â·  4Comments