Skip to content

MinSdk code compatibility #73

Closed
Closed

Description

@LikeTheSalad

Currently, our minSdk is set to 21, however, our code can still use some 21+ APIs without any warnings since the instrumentation subproject's lint check is desugaring-aware.

Based on the above, I believe we should mention in the README that any consumer project with its minSdk set to lower than 26 must enable desugaring, otherwise their app could crash in devices with API level < 26.

I personally prefer to avoid relying on the corelib desugaring mechanism because it can increase the final APK size, however, since the corelib desugaring feature is a requirement from the opentelemetry-java lib as well, then avoiding to use 21+ code in this repo won't make any difference when it comes to having to enable corelib desugaring in the consumer project. Still, I wanted to provide visibility on this issue in order to give more detailed info on why corelib desugaring must be enabled and also to provide a place for comments/ideas on this topic.

Activity

  1. breedx-splk commented on Sep 12, 2023

    @breedx-splk
    Contributor

    I think that putting a notice about the desugaring requirement is very important. We have it in our docs as well, and users have been tripped up by it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions