Hello Guys, How are you all? Hope You all Are Fine. Today when I am trying to run my app on android it gives me the following Execution failed for task ‘:app:checkDebugAarMetadata’ in React Native. So Here I am Explain to you all the possible solutions here.
Without Wasting your time, Lets start This Article to Solve This Error.
How This Execution failed for task ‘:app:checkDebugAarMetadata’ Occurs ?
I am trying to run my app in android by react-native run-android
this command and I am getting below error:
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’ Error?
- How to solve Execution failed for task ‘:app:checkDebugAarMetadata’ Error?
To Solve error Failed to install the app. Make sure you have the Android development environment set up just change the
compileSdkVersion
in your build.gradle file. Open android > build.gradle file. Change compileSdkVersion from 29 to 30. Change targetSdkVersion from 29 to 30. now run again. - error Failed to install the app. Make sure you have the Android development environment set up
To Solve error Failed to install the app. Make sure you have the Android development environment set up just change the
compileSdkVersion
in your build.gradle file. Open android > build.gradle file. Change compileSdkVersion from 29 to 30. Change targetSdkVersion from 29 to 30. now run again. - How to solve A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction ?
To Solve error Failed to install the app. Make sure you have the Android development environment set up just change the
compileSdkVersion
in your build.gradle file. Open android > build.gradle file. Change compileSdkVersion from 29 to 30. Change targetSdkVersion from 29 to 30. now run again.
Solution 1: change the compileSdkVersion
To solve this issue just change the compileSdkVersion
in your build.gradle file.
- Open android > build.gradle file.
- Change
compileSdkVersion
from 29 to 30. - Change
from 29 to 30.targetSdkVersion
- now run again.
Solution 2: add ResolutionStrategy
add ResolutionStrategy in your build.gradle file to resolve this issue. here is example. add this following line to build.gradle file:
configurations.all {
resolutionStrategy { force 'androidx.core:core-ktx:1.6.0 }
}
Solution 3: add 1.7.0-alpha01
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'
Summery
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also Read
Thanks Brother
Take So So many loves from me : )
Thank you brother…….for good solution
It’s my Pleasure to Help You Mayuri Kasar. Thank You For Your Valuable words.