Hey guys, getting this error while building an app.
How to solve this type of error in android studio.
Execution failed for task ‘:app:checkDebugAarMetadata’.
> Could not resolve all files for configuration ‘:app:debugRuntimeClasspath’.
Unknown host ‘jcenter.bintray.com’. You may need to adjust the proxy settings in Gradle.
Also Read: How to pick an image from a gallery/camera
Guys, today we’ll solve this type of error with a different method.
When do you get the error ‘Execution failed for job’?
When we making a project in the android studio then run a project but getting this type of error “execution_failed for task ‘:app:checkDebugAarMetadata’.
So we’ll discuss the different methods with solutions.
We’ll try to one by one all possible methods that help to solve your problem.
First, we’ll discuss the common method and after more accurate method.
Let’s us start solving “Execution failed for task ‘:app:checkDebugAarMetadata'” error in android
Method 1:
This method is a common method to resolve all android related issues.
Try this method.
Build -> clean project
After, run your app.
This method does not work try the second common method.
Method 2:
Even if the above method does not work try this method.
Build -> rebuild project
After, run your app.
Method 3:
This method also helps you to solve this encounter error solution.
This method works in most Android studios.
Sync project with Gradle files.
File -> sync project with gradle files.
Build successfully and error solves but getting warning like ‘Unable to resolve dependency for’:app@debugUniTest/CompileClasspath’:
Finally, we have to find the main problem in dependency.
Also Read: TimePicker with AM-PM mode
First of all, we’ll restart the android studio.
File -> invalidate cashes/Restart… -> Invalidate and Restart
Still getting the same dependency issue try this method 4.
Method 4:
Connect to the internet and got to build.gradle. if you added any new dependency then you can find a suggestion in the right site corner “Ok, apply suggestion!”
If you do not find suggestions then again build.gradle make sure your android studio is connected to the internet.
After, run your app.
This method worked.
What is the main reason?
The main reason for this problem is dependencies. Because the dependency is unable to load metadata or the dependency version fails to download the required file. So connect to android studio internet and click on build.gradle suggestion then it’s working.
So make sure, connect to the internet once and build gradle before adding any new dependencies.
Watch on YouTube