美文网首页
AndroidStudio使用publish发布时报错:"xxx

AndroidStudio使用publish发布时报错:"xxx

作者: 天天小志 | 来源:发表于2021-07-15 16:30 被阅读0次

    近日在发布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发布时报错:"xxx

          本文链接:https://www.haomeiwen.com/subject/obqmpltx.html