Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency ':flutter_local_notifications' requires core library desugaring to be enabled for :app #2389

Open
esaiamuthan opened this issue Aug 16, 2024 · 5 comments

Comments

@esaiamuthan
Copy link

Execution failed for task ':app:checkDevDebugAarMetadata'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
An issue was found when checking AAR metadata:

   1.  Dependency ':flutter_local_notifications' requires core library desugaring to be enabled
       for :app.

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

Hi @here am facing this issue after updating to gradle 8.5.0 version in Android Studio
Can anyone help me on this ?

@PollyGlot
Copy link

I have got the same issue. The error asks to use this code below

compileOptions {
        // Flag to enable support for the new language APIs
        coreLibraryDesugaringEnabled true
        // Sets Java compatibility to Java 8
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

but it is deprecated and should not be used.

@hajini
Copy link

hajini commented Sep 24, 2024

I also have same issue.
gradle:8.2.0

@MaikuB
Copy link
Owner

MaikuB commented Sep 28, 2024

@PollyGlot do you have a link to a repo hosting a minimal app that shows that what is there is deprecated and shouldn't be used? I updated the example app to AGP 8.6.0, built a release APK and didn't see deprecation warnings

@ujwal-yadav-aot
Copy link

same issue solved by adding in app/build.gradle

compileOptions {
   ......//
    coreLibraryDesugaringEnabled true
}

and 
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
}

@shibakar
Copy link

shibakar commented Oct 8, 2024

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
}

This works !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants