When I update gradle in android studio
I found this type error
Unable to load class ‘org.gradle.api.publication.maven.internal.MavenPomMetaInfoProvider’.
his is an unexpected error. Please file a bug containing the idea.log file.
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
5
Answers
In my case, the issue was in this line:
Before now, I was using Gradle plugin 4.2.2, and today I updated it to 7.0.0 and got the same error as you. I solved the issue by removing this line from my build.gradle.
DATE: 04/11/2021 (4th of Nov 2021)
after receiving that error when updated to gradle 7.0.0, I tried @Alex solution but, it didn’t work for me,
I removed two lines and it’s working now.
I experienced this issue when using a library pushed on jitpack.io
The docs on jitpack.io mention to include this in the root
build.gradle
fileWhere as with the latest updates this has changed. Android Studio no longer includes a allprojects block in the root
build.gradle
file.To make this work you now need to include
maven { url 'https://jitpack.io' }
insettings.gradle
file instead.Here is how my settings.gradle looks like:
Downgrade your gradle version to 6.7.1. It works for me.
Check if other modules have this plugin:
In my case it was in
countrycodepicker
I removed it from there, and it worked.