Bintray踩过的坑404 Not Found

2019-08-08  本文已影响0人  筱宓dawnLing

坑一:

HTTP/1.1 404 Not Found [message:Repo 'maven' was not found]

分析:原因一:https://blog.csdn.net/tmac2000/article/details/53261141
原因二:是因为要上传的module下的build.gradle中的publish{……}没填写repoName,或者repoName填错导致
解决原因二:我踩到此坑是因为原因二

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
}

publish {
    userOrg = 'dawnling'//bintray.com你的用户名
    repoName = 'dawnlingLib'//远程仓库名字,不指明,默认是上传到maven 报错:HTTP/1.1 404 Not Found [message:Repo 'maven' was not found]
    groupId = 'com.dawnling'//jcenter上的路径
    artifactId = 'dawnlingLib'//项目名称
    publishVersion = '1.0.0'//版本号
    desc = 'my first module'//描述,不重要
    website = 'https://github.com/LXLYHM'//网站,不重要;尽量模拟github上的地址,例如我这样的;当然你有地址最好了
}

具体细节可参考:https://blog.csdn.net/qq_23179075/article/details/71123452
这篇文章作者写得蛮详细

坑二:AS中Terminal提交坑

* What went wrong:
Execution failed for task ':dawnlinglib:bintrayUpload'.
> org.apache.http.conn.HttpHostConnectException: Connection to https://api.bintray.com refused

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3m 49s
115 actionable tasks: 111 executed, 4 up-to-date
坑二.png

明明刚才提交还好好的,过了一会儿,删了一行空格行想再次提交就报错了
改个版本号就好了,这是不能相同版本提交多次嘛???

上一篇下一篇

猜你喜欢

热点阅读