AndroidStudio使用publish发布时报错:"xxxx.xml.sha512'. Received status code 400 from server: Invalid path...

近日在发布lib包到maven仓库时,出现了以下错误(但是还是可以发布成功):

> Task :xxxxLib:publishMavenPublicationToMavenRepository
Cannot upload checksum for snapshot-maven-metadata.xml. Remote repository doesn't support sha-256. Error: Could not PUT 'http://xxxxxxx/maven-metadata.xml.sha256'. Received status code 400 from server: Invalid path for a Maven 2 repository
Cannot upload checksum for snapshot-maven-metadata.xml. Remote repository doesn't support sha-512. Error: Could not PUT 'http://xxxxxxx/maven-metadata.xml.sha512'. Received status code 400 from server: Invalid path for a Maven 2 repository
Cannot upload checksum for module-maven-metadata.xml. Remote repository doesn't support sha-256. Error: Could not PUT 'http://xxxxxxx/maven-metadata.xml.sha256'. Received status code 400 from server: Invalid path for a Maven 2 repository
Cannot upload checksum for module-maven-metadata.xml. Remote repository doesn't support sha-512. Error: Could not PUT 'http://xxxxxxx/maven-metadata.xml.sha512'. Received status code 400 from server: Invalid path for a Maven 2 repository

解决方式如下:
gradle.properties文件中增加配置,不检查sha-256和``sha-512文件:

systemProp.org.gradle.internal.publish.checksums.insecure=true

你可能感兴趣的:(AndroidStudio使用publish发布时报错:"xxxx.xml.sha512'. Received status code 400 from server: Invalid path...)