简体   繁体   English

无法将Android库上传到bintray.com中的JCenter存储库

[英]Can not upload android library to JCenter repository in bintray.com

The error is could not create package 'maven' was not found . 错误是无法创建包'maven'找不到

在此处输入图片说明

But I have created maven repository in bintray.com. 但是我已经在bintray.com中创建了Maven仓库。 Check the link and screenshot below 检查下面的链接和屏幕截图

https://bintray.com/powerupcloudtech/maven/webviewoverlay https://bintray.com/powerupcloudtech/maven/webviewoverlay

在此处输入图片说明

I followed below tutorials. 我遵循以下教程。 But getting the same error for more than 2 days. 但是收到相同错误超过2天。

1. https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en 1. https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en

2. https://www.numetriclabz.com/distribute-android-library-through-jcenter-from-android-studio/#Upload_library_to_jcenter 2. https://www.numetriclabz.com/distribute-android-library-through-jcenter-from-android-studio/#Upload_library_to_jcenter

3. https://medium.com/@eliaslecomte/publish-an-android-library-on-jcenter-a37770dc9570 3. https://medium.com/@eliaslecomte/publish-an-android-library-on-jcenter-a37770dc9570

I am tired of trying all the solutions from the web. 我厌倦了尝试从网络上获得所有解决方案。

Below is code that I used in library build.gradle 下面是我在库build.gradle中使用的代码

ext {
bintrayRepo = 'maven'
bintrayName = 'webviewoverlay'

publishedGroupId = 'org.pcc.webviewOverlay'
libraryName = 'WebViewOverlay'
artifact = 'webviewoverlay'

libraryDescription = 'A widget to load WebView as an Overlay.'

siteUrl = 'https://github.com/itvignes09/WebViewOverlay'
gitUrl = 'https://github.com/itvignes09/WebViewOverlay.git'

libraryVersion = '1.0.0'

developerId = 'powerupcloudtech'
developerName = 'vigneswaran a'
developerEmail = 'vignesh.m@powerupcloud.com'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"] }

With regards to the build.gradle you attached, it seems that there are some misconfigurations. 关于您附加的build.gradle,似乎有一些错误的配置。

We recommend you to review 'Bintray Examples' and the 'Gradle Bintray Plugin' in Bintray's GitHub. 我们建议您查看Bintray的GitHub中的“ Bintray示例”“ Gradle Bintray插件”

If you still have any follow up questions regarding this, please do not hesitate to contact us at support@jfrog.com. 如果您对此还有任何后续疑问,请随时通过support@jfrog.com与我们联系。

We hope this helps. 我们希望这会有所帮助。

I know it's too late now but it might help other people. 我知道现在为时已晚,但可能会对其他人有所帮助。 libraryName and artifact should and must be same the library module's name in your project . libraryName和工件应且必须与项目中库模块的名称相同 Read the following article for more details, it states everything in details. 阅读以下文章以获取更多详细信息,它详细说明了所有内容。

https://medium.com/@abhishekint16/upload-your-first-android-library-1892c23aea0f https://medium.com/@abhishekint16/upload-your-first-android-library-1892c23aea0f

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM