title: FLUTTER ERROR : Execution failed for task ':app:checkDebugAarMetadata'
body: <p>I am getting this error while running my flutter app.</p>
  <ul>
  <li>What went wrong:
  Execution failed for task ':app:checkDebugAarMetadata'.</li>
  </ul>
  <blockquote>
  <p>A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
  The minCompileSdk (31) specified in a
  dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
  is greater than this module's compileSdkVersion (android-30).
  Dependency: androidx.work:work-runtime:2.7.0-rc01.
  AAR metadata file: C:\Users\HP.gradle\caches\transforms-2\files-2.1\8fcba37f766c3622d8dbd30df4e98577\work-runtime-2.7.0-rc01\META-INF\com\android\build\gradle\aar-metadata.properties.</p>
  </blockquote>
  <ul>
  <li><p>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.</p>
  </li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p>
  </li>
  </ul>
  <p>BUILD FAILED in 8s
  Exception: Gradle task assembleDebug failed with exit code 1</p>
  <p>Below is my AndroidManifest file</p>
  <pre><code>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
  xmlns:tools=&quot;http://schemas.android.com/tools&quot;
  package=&quot;com.owaslo.sukithasagayo.caregiver&quot;&gt;
  &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;
  &lt;application
      android:label=&quot;Sukitha Sagayo Member&quot;
      android:icon=&quot;@mipmap/launcher_icon&quot;&gt;
      &lt;activity
          android:name=&quot;.MainActivity&quot;
          android:launchMode=&quot;singleTop&quot;
          android:theme=&quot;@style/LaunchTheme&quot;
          android:configChanges=&quot;orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode&quot;
          android:hardwareAccelerated=&quot;true&quot;
          android:windowSoftInputMode=&quot;adjustResize&quot;&gt;
          &lt;!-- Specifies an Android theme to apply to this Activity as soon as
               the Android process has started. This theme is visible to the user
               while the Flutter UI initializes. After that, this theme continues
               to determine the Window background behind the Flutter UI. --&gt;
          &lt;meta-data
            android:name=&quot;io.flutter.embedding.android.NormalTheme&quot;
            android:resource=&quot;@style/NormalTheme&quot;
            /&gt;
          &lt;!-- Displays an Android View that continues showing the launch screen
               Drawable until Flutter paints its first frame, then this splash
               screen fades out. A splash screen is useful to avoid any visual
               gap between the end of Android's launch screen and the painting of
               Flutter's first frame. --&gt;
          &lt;meta-data
            android:name=&quot;io.flutter.embedding.android.SplashScreenDrawable&quot;
            android:resource=&quot;@drawable/launch_background&quot;
            /&gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt;
              &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;!-- Don't delete the meta-data below.
           This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --&gt;
      &lt;meta-data
          android:name=&quot;flutterEmbedding&quot;
          android:value=&quot;2&quot; /&gt;
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  <p>Below is my app/build.gradle file</p>
  <pre><code>def localProperties = new Properties()
  def localPropertiesFile = rootProject.file('local.properties')
  if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader -&gt;
      localProperties.load(reader)
  }
  }
  
  def flutterRoot = localProperties.getProperty('flutter.sdk')
  if (flutterRoot == null) {
  throw new GradleException(&quot;Flutter SDK not found. Define location 
   with flutter.sdk in the local.properties file.&quot;)
   }
  
   def flutterVersionCode = 
   localProperties.getProperty('flutter.versionCode')
   if (flutterVersionCode == null) {
    flutterVersionCode = '1'
   }
  
   def flutterVersionName = 
   localProperties.getProperty('flutter.versionName')
   if (flutterVersionName == null) {
      flutterVersionName = '1.0'
   }
  
   apply plugin: 'com.android.application'
   apply from: 
   &quot;$flutterRoot/packages/flutter_tools/gradle/flutter.gradle&quot;
  
   //Load the key.properties file into the keystoreProperties 
   object.
   def keystoreProperties = new Properties()
   def keystorePropertiesFile = rootProject.file('key.properties')
   if (keystorePropertiesFile.exists()) {
   keystoreProperties.load(new 
   FileInputStream(keystorePropertiesFile))
   }
  
   android {
      compileSdkVersion 30
  
      defaultConfig {
          // TODO: Specify your own unique Application ID 
     (https://developer.android.com/studio/build/application-id.html).
      applicationId &quot;com.owaslo.sukithasagayo.caregiver&quot;
      minSdkVersion 19
      targetSdkVersion 30
      versionCode flutterVersionCode.toInteger()
      versionName flutterVersionName
  }
  
  signingConfigs {
      release {
          keyAlias keystoreProperties['keyAlias']
          keyPassword keystoreProperties['keyPassword']
          storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
          storePassword keystoreProperties['storePassword']
      }
  }
  buildTypes {
      release {
          signingConfig signingConfigs.release
      }
  }
  </code></pre>
  <p>}</p>
  <pre><code> flutter {
      source '../..'
    }
  </code></pre>
  <p>Please help !!!</p>