我已经在这一天工作了一半,需要帮助找出为什么我仍然会丢失工件错误。
也许我错过了关于maven工作方式的基本信息,但我认为你需要拥有android部署者,因为android jar不在maven上。部署者将这些Android依赖项移动到您当地的maven仓库。我已按照https://github.com/mosabua/maven-android-sdk-deployer
上的自述文件中的说明操作那么为什么它不能下载Etsy的jar,为什么当我已经从我的本地存储库中包含它时,它会抱怨支持jar,这要归功于android sdk deployer ??? ?
运行方式 - > Maven Clean - > Maven安装
[INFO] Building AklOutdoors 0.0.1-SNAPSHOT
[WARNING] The POM for com.android.support:support-v4:jar:19.0.+ is missing,
no dependency information available
[INFO] BUILD FAILURE
[ERROR] Failed to execute goal on project Could not resolve dependencies
for project
The following artifacts could not be resolved:
com.etsy.android.grid:library:jar:1.0.4,
com.android.support:support-v4:jar:19.0.+: Failure to find
com.etsy.android.grid:library:jar:1.0.4 in
http://repo.maven.apache.org/maven2 was cached in the local repository,
在中心的更新间隔过去或强制更新之前,不会重新尝试解析
这是我的pom.xml
<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>
<groupId>AklOutdoors</groupId>
<artifactId>AklOutdoors</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
</build>
<dependencies>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.4.2_r3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v4</artifactId>
<version>19.1.0</version>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v13</artifactId>
<version>19.1.0</version>
</dependency>
<dependency>
<groupId>com.etsy.android.grid</groupId>
<artifactId>library</artifactId>
<version>1.0.4</version>
<exclusions>
<exclusion>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7</artifactId>
<version>LATEST</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7</artifactId>
<version>LATEST</version>
<type>apklib</type>
</dependency>
</dependencies>
非常感谢帮助以及对我做错的解释。
答案 0 :(得分:2)
我意识到这是相当陈旧/迟到的,但是对于任何遇到过这个问题并偶然发现这个问题的人(像我一样),我相信这里的解决方案是将etsy lib声明为<type>aar</type>
在pom.xml
:
<dependency>
<groupId>com.etsy.android.grid</groupId>
<artifactId>library</artifactId>
<version>1.0.5</version>
<type>aar</type>
<exclusions>
<exclusion>
<artifactId>support-v4</artifactId>
<groupId>com.android.support</groupId>
</exclusion>
</exclusions>
</dependency>