To solve Execution failed for task ‘:app:checkDebugAarMetadata’ error follow below methods.
ERROR LOG
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.
- Open
android > build.gradle
file. - Change
compileSdkVersion
from 29 to 30. - Change
targetSdkVersion
from 29 to 30. - 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