Build failed with an exception - Need help

Dear Experts,
I am looking for some help and not sure what is that I am missing here. I am successfully able to run my flutter app from Visual Studio code. But I am getting below error when using “flutter build apk --split-per-abi” in command prompt. can someone help on this please? your suggestions are much appreciated…

  • What went wrong:
    Execution failed for task ‘:device_id:verifyReleaseResources’.

A failure occurred while executing$ActionFacade
1 exception was raised by workers: Android resource linking failed
C:\Users\myuser.gradle\caches\transforms-2\files-2.1\34b4ab0d8b65ac74ddd00d45b26dd963\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.

 C:\Users\myuser\.gradle\caches\transforms-2\files-2.1\34b4ab0d8b65ac74ddd00d45b26dd963\core-1.1.0\res\values\values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
  • 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