'Unable to load class org.gradle.api.publication.maven.internal.MavenPomMetaInfoProvider
I updated Android Studio to version Arctic Fox 2020.3.0.0 . Then I updated the gradle plugin to version 7.0.0 and the gradle in the gradle-wrapper.properties file to gradle-7.0.2-bin. Now I have this error while syncing:
Unable to load class 'org.gradle.api.publication.maven.internal.MavenPomMetaInfoProvider'.
This is an unexpected error. Please file a bug containing the idea.log file.
Solution 1:[1]
I'v solve this by deleting one line in build.gradle:
apply plugin: 'com.github.dcendents.android-maven'
Solution 2:[2]
After removing the lin apply plugin as mentioned above you have to find the code down below as well.
code {
background: white;
padding: 2px;
}
<pre><code>
install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name 'Cordova'
url 'https://cordova.apache.org'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'stevengill'
name 'Steve Gill'
}
}
scm {
connection 'scm:git:https://github.com/apache/cordova-android.git'
developerConnection 'scm:git:[email protected]:apache/cordova-android.git'
url 'https://github.com/apache/cordova-android'
}
}
}
}
}
</code> </pre>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Etienne Kaiser |
| Solution 2 | Danial clarc |
