problems in building a mobile app - FAILURE: Build failed with an exception.

Hi,
when i build a apk it gives me this error?
what can i do?

BlockquoteLaunching lib\main.dart on sdk gphone64 x86 64 in debug mode…
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.

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.
  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 5m
Error: Gradle task assembleDebug failed with exit code 1

Exited (1).

  1. The first one is only a warning (and a “normal” one (I don’t think warnings are normal, but, anyways)).

  2. flutter_local_notifications will bite you, especially after publishing (experience by pain). awesome_notifications | Flutter package is better.

If you want to still use it, try this: android - Dependency ':flutter_local_notifications' requires core library desugaring to be enabled for :app - Stack Overflow