1. Gradle exception Multiple artifacts

A POM cannot have multiple artifacts with the same type and classifier. Already have MavenArtifact xxx-release:aar:aar:null, trying to add MavenArtifact xxx-release:aar:aar:null.

The uploadArchives command will automatically generate artifacts from the Build. gradle file on the Module. Delete the following configuration can be (test feasible, although do not know the principle).

artifacts {
  archives file('xxxxx')
}
Copy the code

If you delete this configuration, there is a problem, that is, you cannot configure the meaning of the aar package. In my test, I will automatically upload the AAR of build directory Release. If I upload the AAR of debug, I don’t know how to configure it (although in most cases it is not necessary).

2. Gradle abnormal Return code is: 401, ReasonPhrase: Unauthorized

This reason is that you configure the account password of the warehouse is wrong, or your account authority is not enough, check can be.

ReasonPhrase: PUT. 3. Gradle exception Return code is: 405, ReasonPhrase: PUT.

The reason is that the configured library type is wrong, proxy or group nexus repository can not be uploaded, upload this error. Libraries can only be uploaded to a Hosted type repository.