我的版本有什麼問題?爲什麼bintrayUpload無法創建版本'0.1'? HTTP/1.1 401未授權
bintray.gradle
apply plugin: 'com.jfrog.bintray'
version = '0.1'
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
bintray{
user = 'user_name'
key = 'apikey'
configurations = ['archives']
pkg {
repo = 'maven'
name = 'notification-handler'
desc = 'first initiate'
websiteUrl = 'myWebsiteUrl'
vcsUrl = 'MyVcsUrl'
licenses = ["Apache-2.0"]
publish = true
publicDownloadNumbers = true
}
}
錯誤
Information:Gradle tasks [bintrayUpload]
Error:Execution failed for task ':parham-notification-handler:bintrayUpload'.
Could not create version '0.1': HTTP/1.1 401 Unauthorized [message:This resource requires authentication]
Information:BUILD FAILED
感謝。
我用這個 [link](https://antoniocappiello.com/2015/11/11/publish-your-library-to-jcenter-in-3-steps/) 可以接受嗎? – Simon
是的,爲什麼不(我沒有時間閱讀它):)我添加了網址到教程,我用來上傳我的圖書館 - 它爲我工作了很多次。 – ROBOHORSE