Skip to content

Desugaing required error even If minimum Android API Version set to 26+ #705

Description

@mdsanf1

Describe the bug

The SDK documentation indicates that,

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.

However, while building a sample APP with minSdk = 28, :app:checkDebugAarMetadata is failing with error,

2 issues were found when checking AAR metadata:

  1.  Dependency 'software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk-android:1.33.0' requires core library desugaring to be enabled
      for :app.

      See https://developer.android.com/studio/write/java8-support.html for more
      details.

  2.  Dependency 'software.amazon.awssdk.crt:aws-crt-android:0.47.0' requires core library desugaring to be enabled
      for :app.

      See https://developer.android.com/studio/write/java8-support.html for more
      details.

Expected Behavior

The app build should succeed without error if desugaring is not enabled and when minSdk is 26+.

Current Behavior

The app build fails with error indicating that desugaring is not enabled (minSdk is 28).

Reproduction Steps

Steps to reproduce:

  • Create a sample android project.
  • Add the dependency to "software.amazon.awssdk.iotdevicesdk:aws-iot-device-sdk-android"
  • Try building the project or run ./gradlew :app:checkDebugAarMetadata
  • The build fails.

Note:
agp version: "9.3.1"
AWS IoT device SDK version: "1.34.0"

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.34.0

Environment details (OS name and version, etc.)

Android. AGP version: 9.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions