From 31c1ea2bda3ff13b34cf9055a84077c6d0de59c3 Mon Sep 17 00:00:00 2001 From: Rakshil Modi Date: Fri, 7 Aug 2026 11:35:56 -0700 Subject: [PATCH 1/4] updating readme --- documents/ANDROID.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/documents/ANDROID.md b/documents/ANDROID.md index 8422d8ac..bf657d54 100644 --- a/documents/ANDROID.md +++ b/documents/ANDROID.md @@ -40,8 +40,26 @@ a dependency of the aws-iot-device-sdk-android library. * Android SDK 24 ([Download SDK Manager](https://developer.android.com/tools/releases/platform-tools#downloads)) * [Set ANDROID_HOME](./PREREQUISITES.md#set-android_home) -> [!NOTE] -> The SDK supports Android minimum API of 24 but requires [desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) to support Java 8 language APIs used in by the SDK. If minimum Android API Version is set to 26+ desugaring is not required. +> [!IMPORTANT] +> The published `aws-iot-device-sdk-android` artifact (and its `aws-crt-android` dependency) are built with [core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) enabled, because the SDK uses Java 8 library APIs such as `java.time` while supporting a minimum Android API of 24. +> +> As a result, **every app that consumes the SDK must also enable core library desugaring, regardless of its own `minSdk`** (including API 26+). If it is not enabled, the build fails at `checkDebugAarMetadata` with `requires core library desugaring to be enabled`. +> +> Add the following to your app module's `build.gradle`: +> +> ```groovy +> android { +> compileOptions { +> coreLibraryDesugaringEnabled true +> } +> } +> +> dependencies { +> coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' +> } +> ``` +> +> If you build the SDK from source with a `minSdk` of 26 or higher, you may remove the desugaring requirement from the library builds; in that case consuming apps at API 26+ do not need to enable it. ### Build and install IoT Device SDK from source > [!NOTE] From 6e2fef0c2e33901cd9f041d348697418c4217041 Mon Sep 17 00:00:00 2001 From: Rakshil Modi Date: Fri, 7 Aug 2026 11:46:24 -0700 Subject: [PATCH 2/4] clarify both build libaries --- documents/ANDROID.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documents/ANDROID.md b/documents/ANDROID.md index bf657d54..967b00c8 100644 --- a/documents/ANDROID.md +++ b/documents/ANDROID.md @@ -59,7 +59,7 @@ a dependency of the aws-iot-device-sdk-android library. > } > ``` > -> If you build the SDK from source with a `minSdk` of 26 or higher, you may remove the desugaring requirement from the library builds; in that case consuming apps at API 26+ do not need to enable it. +> If you build from source with a `minSdk` of 26 or higher, you may remove the desugaring requirement — but you must do so in **both** libraries: this SDK (`aws-iot-device-sdk-android`) **and** its [`aws-crt-java`](https://github.com/awslabs/aws-crt-java) dependency (`aws-crt-android`), which is pulled in transitively and enforces the same requirement on its own. Once both are rebuilt at `minSdk` 26+ with the flag removed, consuming apps at API 26+ no longer need to enable desugaring. ### Build and install IoT Device SDK from source > [!NOTE] From 4d1de595015132dc28b4e55f86e57c0e4db2c09f Mon Sep 17 00:00:00 2001 From: Rakshil Modi Date: Fri, 7 Aug 2026 11:47:56 -0700 Subject: [PATCH 3/4] trivial --- documents/ANDROID.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documents/ANDROID.md b/documents/ANDROID.md index 967b00c8..04925ffb 100644 --- a/documents/ANDROID.md +++ b/documents/ANDROID.md @@ -59,7 +59,7 @@ a dependency of the aws-iot-device-sdk-android library. > } > ``` > -> If you build from source with a `minSdk` of 26 or higher, you may remove the desugaring requirement — but you must do so in **both** libraries: this SDK (`aws-iot-device-sdk-android`) **and** its [`aws-crt-java`](https://github.com/awslabs/aws-crt-java) dependency (`aws-crt-android`), which is pulled in transitively and enforces the same requirement on its own. Once both are rebuilt at `minSdk` 26+ with the flag removed, consuming apps at API 26+ no longer need to enable desugaring. +> If you build from source with a `minSdk` of 26 or higher, you may remove the desugaring requirement but you must do so in **both** libraries: this SDK (`aws-iot-device-sdk-android`) **and** its [`aws-crt-java`](https://github.com/awslabs/aws-crt-java) dependency (`aws-crt-android`), which is pulled in transitively and enforces the same requirement on its own. Once both are rebuilt at `minSdk` 26+ with the flag removed, consuming apps at API 26+ no longer need to enable desugaring. ### Build and install IoT Device SDK from source > [!NOTE] From 12c13a421798716d183225317caafd0102c52ac2 Mon Sep 17 00:00:00 2001 From: Rakshil Modi Date: Fri, 7 Aug 2026 13:20:44 -0700 Subject: [PATCH 4/4] add comment --- documents/ANDROID.md | 1 + 1 file changed, 1 insertion(+) diff --git a/documents/ANDROID.md b/documents/ANDROID.md index 04925ffb..0f2c2815 100644 --- a/documents/ANDROID.md +++ b/documents/ANDROID.md @@ -55,6 +55,7 @@ a dependency of the aws-iot-device-sdk-android library. > } > > dependencies { +> // Use the latest version compatible with your AGP (2.0.4 requires AGP 7.4+) > coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' > } > ```