【发布时间】:2017-12-26 08:45:21
【问题描述】:
...即使错误报告了正确的下载 URL。
(下面的 Bintray 详细信息。)
Gradle 回购
repositories {
jcenter()
maven { url 'https://dl.bintray.com/myUsername/myRepo/' }
}
依赖关系
compile('com.domain.groupid:library-core:v1.2.3@aar') {
transitive=true
}
compile('com.domain.groupid:library-support:v1.2.3@aar') {
transitive=true
}
错误
Error:Could not find library-core.aar (com.domain.groupid:library-core:v1.2.3).
Searched in the following locations:
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/v1.2.3/library-core-v1.2.3.aar
如果我复制该 URL,我可以在退出的窗口中下载它。为什么 Gradle 会出现问题?
还有另一个类似的编译依赖项(此处列为library-support),但我假设它没有得到它,因为这个首先失败了。
设置...
我在 Bintray 上有一个个人公共 repo,其中包含两个 android 库。
https://bintray.com/myUsername/myRepo/library-core
https://bintray.com/myUsername/myRepo/library-support
在我的库的 gradle 脚本中,两者都有按 bintray 规则上传的版本。版本上传,我可以在 bintray UI 中看到它们,我可以下载它们并查看它们是否符合我的预期:
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/maven-metadata.xml
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/library-core-v1.2.3/library-core-v1.2.3-sources.jar
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/library-core-v1.2.3/library-core-v1.2.3.aar
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/library-core-v1.2.3/library-core-v1.2.3.pom
// Same for library-support. All of these download in a signed out window.
gradle 期待别的东西吗?
【问题讨论】:
-
您能否提供您对 Bintray 的依赖项的 实际 链接?我想重现这个问题。顺便说一句:在 Maven 中为库版本使用
v前缀是非常罕见的。暗示这个属性是的版本。也许这与您的问题有关。 -
你是赢家。我重新上传了版本名称中没有 v 的内容,并更新了我的依赖项以匹配,生活很好。请发表您的评论作为答案,以便我奖励您一些声誉。
-
太棒了!请在下面找到答案。
标签: android maven gradle aar bintray