使用 jfrog.bintray HTTP/1.1 404 Not Found 发布库 [message:Repo '' was not found]

Publishing a library using jfrog.bintray HTTP/1.1 404 Not Found [message:Repo '' was not found]

今天我一直在为这个问题绞尽脑汁,似乎无法弄清楚这个设置有什么问题。我已经按照本教程进行操作,以便能够将 android 库上传到 bintray(然后将其添加到 jcenter)。以下是相关文件:

项目级别build.gradle:

buildscript {
    ext.kotlin_version = '1.3.20'
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
        classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

图书馆级别build.gradle:

apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'

ext{

    bintrayRepo = "FlexibleRecyclerView"
    bintrayName = "com.tornelas.flexiblerecyclerview"

    libraryName = "flexiblerecyclerview"

    //artifact
    publishedGroupId = 'com.tornelas.flexiblerecyclerview'
    artifact = 'flexiblerecyclerview'
    libraryVersion = '0.1'

    libraryDescription = 'A recycler view where you can set the number of columns/rows and orientation on the .xml file instead of setting it on the layout manager.'
    siteUrl = ''
    gitUrl = ''
    developerId = 'tornelas'
    developerName = 'Tiago Ornelas'
    developerEmail = ''
    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.text'
    allLicenses = ['Apache-2.0']
}

android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 28
        versionCode 1
        versionName "0.1"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

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

if(project.rootProject.file('local.properties').exists()){
    apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
    apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
}

(出于隐私原因,我省略了 siteUrl、gitUrl 和 developerEmail)

在 bintray 仪表板上:http://snpy.in/UwPAv5

当我 运行 'bintrayUpload' 我得到以下信息:

1: Task failed with an exception.
Execution failed for task ':flexiblerecyclerview:bintrayUpload'.
> Could not create package 'tornelas/FlexibleRecyclerView/com.tornelas.flexiblerecyclerview': HTTP/1.1 404 Not Found [message:Repo 'FlexibleRecyclerView' was not found]

2: Task failed with an exception.
Execution failed for task ':bintrayPublish'.
> Could not sign version '0.1': HTTP/1.1 404 Not Found [message:Repo 'FlexibleRecyclerView' was not found]

我想知道这个问题是否因为这个图书馆 "FlexibleRecyclerView" 是一个组织(称为 "Frontkom")的一部分而发生。但是我无法解决这个问题。

我确定 local.properties 上的凭据是正确的,因为我已经使用他们的 REST API 与他们进行了身份验证。

非常感谢!

所以,问题是我试图发布到属于我的组织的存储库(即使我是该组织的所有者),但我无法在该组织外部创建存储库。因此,只需添加

bintray {
    pkg {
        userOrg = 'myorganizationname'
    }
}

ext{} 之后我的模块的 build.gradle 我能够成功上传它。