1

Invalid depfile: C:\Users\bhard\AndroidStudioProjects\true_weather.dart_tool\flutter_build\54ec25ea3e00199f07d81cf92fc10210\kernel_snapshot.d Invalid depfile: C:\Users\bhard\AndroidStudioProjects\true_weather.dart_tool\flutter_build\54ec25ea3e00199f07d81cf92fc10210\kernel_snapshot.d

FAILURE: Build failed with an exception.

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

Multiple task action failures occurred: 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.window:window-java:1.0.0-beta04. AAR metadata file: C:\Users\bhard.gradle\caches\transforms-2\files-2.1\5695d8d932d545af38bf66b725566d02\jetified-window-java-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties. 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.window:window:1.0.0-beta04. AAR metadata file: C:\Users\bhard.gradle\caches\transforms-2\files-2.1\e4e324fde2799cc82a9b6d2e3e16efc2\jetified-window-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.

  • 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 42s Exception: Gradle task assembleDebug failed with exit code 1

4
  • Remove the first line in the main.dart, and try Commented Feb 13, 2022 at 12:34
  • thanks for helping but when its gone a new error occured. Commented Feb 13, 2022 at 12:53
  • if you update your question, i could help you Commented Feb 13, 2022 at 12:57
  • I updated the question . so can you please just check it out what's the problem. Commented Feb 13, 2022 at 13:53

2 Answers 2

0

Go to app-level build.gradle file.

Change

  1. compileSdkVersion to 31
  2. targetSdkVersion 31
Sign up to request clarification or add additional context in comments.

Comments

-1

Thanks man for trying to help but I Got The solution Myself .

Solution:- If you have same error like mine then you only need to checkout your compileSdkVersion which are shown in your error like this "module's compileSdkVersion (android-30)." somewhere in error . then you need to find "minCompileSdk" this word written in your error , in my case it is like "minCompileSdk (31) " this show required minCompileSdk version. so you have to change your version to this one .

To do that first you need to go to "android>>build.gradle" finds in your project . then open it in android studio by using the button find in top right corner. and change it to required version and save it.

You Did it.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.