I already tried to Invalidate/Cache and restart
also tried to remove .gradle and gradle file.. but this problem still shows up.
Error:Unable to find method 'com.android.build.gradle.BaseExtension.getTestVariants()Lorg/gradle/api/internal/DefaultDomainObjectSet;'. Possible causes for this unexpected error include:
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
- Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
- The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)
- Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
Any thoughts?
Your help will be appreciated Thanks!
Just delete gradle folder , and let android studio download it again with click on Sync now !. Save this answer.
Try to reset the gradle to an older version which you can load correctly. Change the distributionUrl in gradle-wrapper.properties in gradle scripts. And this error can be solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With