. Advertisement .
..3..
. Advertisement .
..4..
The error: “DefaultTaskContainer#NamedDomainObjectProvider.configure(Action) on task set cannot be executed in the current context” is a common error that can show up in many ways. In this blog, we will go through some of the ways you can fix this issue. Read on.
What is “DefaultTaskContainer#NamedDomainObjectProvider.configure(Action) on task set cannot be executed in the current context” error?
After connecting Firebase to your project, you may experience the following issue.
DefaultTaskContainer#NamedDomainObjectProvider.configure(Action) on task set cannot be executed in the current context
You have got the issue ”DefaultTaskContainer#NamedDomainObjectProvider.configure(Action) on task set cannot be executed in the current context” because something in google-services:4.3.9 has been broken by Google, so your program cannot run and it raises an error.
Before finding the best way to solve this problem, you have to learn about google-services. Have you ever learned about google-services?
Google services are the products and services the company offers to its customers. Although some of their services are fee-based, the majority are free to use. Some google services that we commonly use are:
- Google Search Engine
- Google Chrome
- Gmail
- Android
- YouTube
- Google Adsense
- Google Drive
- Google Ads
- Google Maps
- Google Docs
Moreover Google Mobile Services (GMS) is a group of services and application programming interfaces that are exclusive to Google. Manufacturers of Android products, including smartphones, tablets, and smart TVs, use GMS. It mostly supports Android OS.
How to solve the problem “DefaultTaskContainer#NamedDomainObjectProvider.configure(Action) on task set cannot be executed in the current context” error?
Our Approach: Downgrade google-services version to google-services:4.3.8
Based on the above useful information, we can easily find the best way to fix the error “DefaultTaskContainer#NamedDomainObjectProvider.configure(Action) on task set cannot be executed in the current context”. We need to change com.google.gms:google-services:4.3.9 to google-services:4.3.8. This is how:
Simply adjust the line below in your build.gradle file:
From:
classpath 'com.google.gms:google-services:4.3.9'
To:
classpath 'com.google.gms:google-services:4.3.8'
Conclusion
We hope you enjoyed our article about the error. With this knowledge, we know that you can fix your error: “DefaultTaskContainer#NamedDomainObjectProvider.configure(Action) on task set cannot be executed in the current context” quickly by following these steps! If you still have any other questions about fixing this syntax error, please leave a comment below. Thank you for reading!
Leave a comment