我工作了 2 天来部署我的 github 库 CircularImageView在 Maven Central 中使用它与这样的 gradle 依赖关系:
compile 'com.mikhaellopez:circularimageview:2.0.0'
我严格按照本教程进行操作:Publish an aar file to jCenter with Gradle但是没有什么可做的,我不能那样访问我的图书馆。
请帮助我知道我做错了什么..
链接:
- Bintray 存储库:https://bintray.com/lopspower/maven/com.mikhaellopez%3Acircularimageview/view
- Sonatype 问题:https://issues.sonatype.org/browse/OSSRH-18203
编辑:10/14/2015
在 tutorial 的第 16 步中最终将所有内容与 Maven Central 同步。您需要一个用户 token 密码。我如何获得它?
Bintray 回答:
Hi, The "User token password" is not taken from Bintray, it can be found in your Maven Central account. Please see further information on syncing with Maven here: https://bintray.com/docs/usermanual/uploads/uploads_syncingartifactswithmavencentral.html Regards Bintray Team
最后,不清楚,但“用户 token 密码”实际上对应于您的Sonatype 帐户的密码。现在项目正常同步,但是我仍然无法访问项目:
Failed to resolve: com.mikhaellopez:circularimageview:2.0.0
最佳答案
在bintray中可以看到所有的库HERE . 我意识到我的图书馆很好,但路径不同。
的确,在 Android Studio 中 module name 非常重要。所以我在“circularimageview”中重命名为“CircularImageView-Library”。我再次与新版本同步,现在可以使用了。
我可以像这样使用 gradle 访问我的图书馆:
compile 'com.mikhaellopez:circularimageview:2.0.1'
关于android - 将 GitHub Android 库发布到 Maven Central,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33104152/