gradle无法从工件中解析.aar

时间:2018-10-19 07:22:55

标签: android gradle dependencies aar

我有一个项目使用我自己的.aar库,该库已上传到工件上。

.pom文件似乎是正确的,因为我查看了maven Central上其他可用的.aar库。 .pom看起来像这样:

    <?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.modum</groupId>
  <artifactId>sweetblueservice</artifactId>
  <version>1.15</version>
  <packaging>aar</packaging>
  <dependencies>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>appcompat-v7</artifactId>
      <version>27.1.1</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support.constraint</groupId>
      <artifactId>constraint-layout</artifactId>
      <version>1.1.3</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.streamsupport</groupId>
      <artifactId>android-retrofuture</artifactId>
      <version>1.6.3</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.jakewharton.timber</groupId>
      <artifactId>timber</artifactId>
      <version>4.7.1</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>2.10</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.modum</groupId>
      <artifactId>logger-utils</artifactId>
      <version>0.1.0</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.modum</groupId>
      <artifactId>sweetblue</artifactId>
      <version>2.52.16</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
</project>

当我在机器上的本地maven存储库中安装此库时,可以像这样在我的Android项目中获取依赖项:

implementation "io.modum:sweetblueservice:1.15"

但是以某种方式,当应该从Artifactory解析库时,这是行不通的:

    > Could not find sweetblueservice.jar (io.modum:sweetblueservice:1.15).
  Searched in the following locations:
      https://modum.jfrog.io/modum/gradle-dev/io/modum/sweetblueservice/1.15/sweetblueservice-1.15.jar

不知何故

0 个答案:

没有答案