Reputation: 73
Since i've reinstalled Android Studio i have a strange problem everytime i create a project. Immediately after creating it, i get the Exception : Gradle sync failed: Unable to load class 'org.gradle.internal.typeconversion.NotationConverter'. and therefore i cant do anything at all in android studio at the moment.
I already tried all of the follwoing suggestions and i also cleaned and rebuild the project although that shouldnt be the problem because the problem also appears whenever im creating a new project.
Error:Unable to load class 'org.gradle.internal.typeconversion.NotationConverter'. 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 ideas?
Upvotes: 7
Views: 10978
Reputation: 3437
Someone on my team just ran in to this today. Somehow, their install of gradle became corrupted. Solution was to remove it – the gradle wrapper downloaded a replacement as soon as we invoked it again. So:
gradle/wrapper/gradle-wrapper.properties
and observe the gradle version (e.g., distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
is gradle-6.5-bin
.)rm -r ~/.gradle/wrapper/dists/gradle-6.5-bin
./gradlew assembleDebug
)After that, we were "back in business!"
Upvotes: 10