如何将android库发布到Jfrog bintray?

如何将android库发布到Jfrog bintray?,第1张

概述我正在开发Android库开发,我已经完成了我的库工作并生成了aar和jar文件,但是当我尝试发布到二进制文件时,我收到一条错误消息.FAILURE:Buildfailedwithanexception.*Whatwentwrong:Executionfailedfortask':mylittlelibrary:bintrayUpload'.>Couldnotcreatep

我正在开发Android库开发,我已经完成了我的库工作并生成了aar和jar文件,但是当我尝试发布到二进制文件时,我收到一条错误消息.

FAILURE: Build Failed with an exception.* What went wrong:Execution Failed for task ':mylittlelibrary:bintrayUpload'.> Could not create package 'abcd/maven/helloaar.example.com.mylittlelibrary': http/1.1 404 Not Found [message:Repo 'maven' was not found]* Try:  Run with --stacktrace option to get the stack trace. Run with --info or --deBUG option to get more log output.BUILD FailedTotal time: 5.391 secsCould not create package 'abcd/maven/helloaar.example.com.mylittlelibrary': http/1.1 404 Not    Found [message:Repo 'maven' was not found]2:41:59 AM: External task execution finished 'bintrayUpload'.

的build.gradle

apply plugin: 'com.androID.library'apply plugin: 'com.github.dcendents.androID-maven'apply plugin: 'com.jfrog.bintray'repositorIEs {   mavenCentral()}androID {compileSdkVersion 24buildToolsversion "24.0.0"defaultConfig {    minSdkVersion 17    targetSdkVersion 24    versionCode 1    versionname "1.0"}buildTypes {    release {        MinifyEnabled false        proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro'    }  }}dependencIEs {    compile filetree(dir: 'libs', include: ['*.jar'])    testCompile 'junit:junit:4.12'    compile 'com.androID.support:appcompat-v7:24.0.0-beta1'} group = 'helloaar.example.com.mylittlelibrary' version = '1.0.2' task generateSourcesJar(type: Jar) {     from androID.sourceSets.main.java.srcDirs     classifIEr 'sources' } task generateJavaDocs(type: Javadoc) {    source = androID.sourceSets.main.java.srcDirs     classpath += project.files(androID.getbootclasspath()        .join(file.pathSeparator)) } task generateJavaDocsJar(type: Jar) {     from generateJavaDocs.destinationDir     classifIEr 'javadoc' } generateJavaDocsJar.dependsOn generateJavaDocsbintray {    user = 'abcd'    key = '1234567890fghgfhffjfgjfjfjrtyjtkjg'    pkg {       repo = 'maven'       name = 'helloaar.example.com.mylittlelibrary'    version {        name = '1.0.2'        desc = 'My test upload'        released  = new Date()        vcsTag = '1.0.2'    }    licenses = ['Apache-2.0']    vcsUrl = ''    websiteUrl = ''}configurations = ['archives']}artifacts {   archives generateJavaDocsJar   archives generateSourcesJar}

请仔细阅读我的脚本,并建议我一些解决方案.

解决方法:

在发布到Bintray之前,您必须拥有稳定的代码构建.
Bintray的层次结构如下:
用户 – >回购 – >包 – >版本 – >神器
表示Repo应该高于该层次结构的包.

gradle.build中的以下行可能是导致错误的主要原因:

pkg {    repo = 'maven'    name = 'helloaar.example.com.mylittlelibrary'}

层次结构是错误的.

使用maven时,您应检查是否符合maven约定,否则Maven Build无法成功. Explanation for Maven Repositories on Bintray.

您遇到的错误:

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

意味着您在Bintray上没有存储库会调用maven.所有软件包版本和文件都应该在您创建的Bintray存储库下.

有关更多详细信息或支持问题,您可以使用适用于所有Bintray用户的Bintray support团队,并可以帮助您解决与任何JFrog平台服务相关的任何问题,例如Bintray,Artifactory,Mission control& X射线.

总结

以上是内存溢出为你收集整理的如何将android库发布到Jfrog bintray?全部内容,希望文章能够帮你解决如何将android库发布到Jfrog bintray?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1118361.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存