Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gradle issues details in discription

Unable to find method 'org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String;'. Possible causes for this unexpected error include: 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.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

like image 258
Uzi Zri Avatar asked Apr 17 '21 10:04

Uzi Zri


People also ask

What is testImplementation in Gradle?

Configuration inheritance and composition For example the testImplementation configuration extends the implementation configuration. The configuration hierarchy has a practical purpose: compiling tests requires the dependencies of the source code under test on top of the dependencies needed write the test class.


3 Answers

I resolved the error by downgrading gradle. To do so, in the gradle-wrapper.properties file, I made the following changes.

It was:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

It is now:

distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
like image 97
nomadus Avatar answered Nov 25 '22 14:11

nomadus


If you are using IntelliJ Community Edition, upgrading the IDE to IntelliJ IDEA 2021.1.2 (Community Edition) solved the problem for me. Previously I was using the 2019 version and I was getting the same error.

like image 29
Shiela Avatar answered Nov 25 '22 14:11

Shiela


I had the same problem. I solved it, when I update Android Studio with Gradle.

like image 34
Andrey Molochko Avatar answered Nov 25 '22 16:11

Andrey Molochko