在Android Project中不依赖Picasso

时间:2019-01-24 16:37:48

标签: android gradle android-gradle picasso

我想查看我的Android项目中的所有依赖关系,但是遇到Picasso库,该库不会“展开”其依赖关系。

我尝试了其他一些典型的Gradle命令

./gradlew :app:dependencies

结果始终为:

+--- com.squareup.picasso:picasso:2.5.2
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.11
|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.11
...

有人知道为什么没有列出Picasso依赖项吗?

2 个答案:

答案 0 :(得分:0)

您必须已将具有Picasso依赖项的排除项写在了gradle中。还要检查类型是否为implementation

答案 1 :(得分:0)

这是因为它没有任何“编译/实现”范围的依赖项。

您可以检查pom.xml的毕加索:

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.squareup.picasso</groupId>
    <artifactId>picasso-parent</artifactId>
    <version>2.5.2</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>picasso</artifactId>
  <name>Picasso</name>

  <dependencies>
    <dependency>
      <groupId>com.squareup.okhttp</groupId>
      <artifactId>okhttp</artifactId>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easytesting</groupId>
      <artifactId>fest-assert-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.squareup</groupId>
      <artifactId>fest-android</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.robolectric</groupId>
      <artifactId>robolectric</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp</groupId>
      <artifactId>mockwebserver</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.intellij</groupId>
      <artifactId>annotations</artifactId>
      <version>9.0.4</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.google.android</groupId>
      <artifactId>android</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>emma-maven-plugin</artifactId>
        <version>1.0-alpha-3</version>
      </plugin>
    </plugins>
  </reporting>
</project>

来源:https://search.maven.org/artifact/com.squareup.picasso/picasso/2.5.2/jar