79395311

Date: 2025-01-28 22:29:47
Score: 0.5
Natty:
Report link

Following up on @Akshaykumar's solution, I encountered this error: FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.

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.

To resolve this, add the following to your android/app/build.gradle:

  1. Add the desugaring dependency:
dependencies {
    coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.0.3"
}

Enable Java 17 and desugaring:

gradleCopyandroid {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
        coreLibraryDesugaringEnabled true
    }
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Akshaykumar's
  • Low reputation (0.5):
Posted by: FarHard112