1

我已经在这里工作了一天半,需要帮助弄清楚为什么我仍然会丢失工件错误。

也许我错过了有关 maven 工作方式的一些基本知识,但我认为您需要拥有 android 部署程序,因为 android jar 不在 maven 上。部署者将这些 android 依赖项移动到您的本地 maven 存储库。我已按照https://github.com/mosabua/maven-android-sdk-deployer上的自述文件中的说明进行操作

那么为什么它不能下载 Etsy 的 jar,当我已经从我的本地存储库中包含它时,它为什么抱怨支持 jar,这要归功于 android sdk 部署程序????

运行方式 -> Maven 清理 -> 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,

在中央的更新间隔过去或强制更新之前,不会重新尝试解析

  1. 已安装 Maven。
  2. Maven Android SDK Deployer 安装没有错误。
  3. SDK 管理器中的所有内容都已安装,包括 Android 支持库和 Android 支持存储库
  4. 安装了适用于 Maven Eclipse 的 Android 并安装了适用于 Eclipse 的 Maven 集成。

这是我的 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>

非常感谢帮助和解释我做错了什么。

4

1 回答 1

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>
于 2015-01-26T04:23:44.187 回答