Home » Execution failed for task ‘:app:checkDebugAarMetadata’

Execution failed for task ‘:app:checkDebugAarMetadata’

To solve Execution failed for task ‘:app:checkDebugAarMetadata’ error follow below methods.


error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

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

How to solve Execution failed for task ‘:app:checkDebugAarMetadata’ ?

Simply modify the compileSdkVersion in your build.gradle file to resolve this issue.

  1. Open  android > build.gradle file.
  2. Change compileSdkVersion from 29 to 30.
  3. Change targetSdkVersion from 29 to 30.
  4. now Run again.

Alternative to Solve Execution failed for task ‘:app:checkDebugAarMetadata’

Add the below code in build.gradle inside android.

 configurations.all {
        resolutionStrategy {
            force 'androidx.core:core-ktx:1.6.0'

and then apply this

implementation 'androidx.core:core-ktx:1.7.0-alpha01'

Hope the above solution works.

Also read :

JSONDecodeError: Expecting value: line 1 column 1 (char 0)
UnhandledPromiseRejectionWarning: Error: You must await server.start() before calling server.applyMiddleware() at ApolloServer