8

我有一个 Android Maven 项目,我正在尝试使用 Eclipse。我也在使用 Android Support v7 AppCompat 库。在我的 pom.xml 中,我同时导入了 apklib 和 jar。我已经尝试更新到 m2e-android 插件的 0.4.3-SNAPSHOT 版本,但我仍然收到错误

 Description    Resource    Path    Location    Type
dependency=[android.support:compatibility-v7-appcompat:apklib:18:compile] not found in workspace    pom.xml /Studio54   line 1  me.gladwell.eclipse.m2e.android.markers.dependency.apklib

这是我的 pom.xml

http://maven.apache.org/maven-v4_0_0.xsd">4.0.0 com.lhs.app Studio54 0.0.7-SNAPSHOT apk Studio54

<repositories>
    <repository>
        <id>ossSonatype</id>
        <url>https://oss.sonatype.org/content/groups/public</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

<properties>
    <platform.version>4.3_r1</platform.version>
</properties>

<dependencies>
    <dependency>
        <groupId>android</groupId>
        <artifactId>android</artifactId>
        <version>${platform.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>android.support</groupId>
        <artifactId>compatibility-v4</artifactId>
        <version>18</version>
    </dependency>
    <dependency>
        <groupId>android.support</groupId>
        <artifactId>compatibility-v7-appcompat</artifactId>
        <version>18</version>
        <type>apklib</type>
    </dependency>
    <dependency>
        <groupId>android.support</groupId>
        <artifactId>compatibility-v7-appcompat</artifactId>
        <version>18</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.2.4</version>
    </dependency>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>volley</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>com.testflight</groupId>
        <artifactId>lib</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>org.robolectric</groupId>
        <artifactId>robolectric</artifactId>
        <version>2.2-SNAPSHOT</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.9</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.9.5</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <version>3.6.1</version>
            <configuration>
                <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
                <assetsDirectory>${project.basedir}/assets</assetsDirectory>
                <resourceDirectory>${project.basedir}/res</resourceDirectory>
                <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
                <sdk>
                    <platform>16</platform>
                </sdk>
                                    <undeployBeforeDeploy>true</undeployBeforeDeploy>
            </configuration>
            <extensions>true</extensions>
        </plugin>

        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>

4

1 回答 1

0

您可以尝试更新您的android sdk。并从 Help->Check for Updates 选项卡检查 eclipse 更新。

于 2014-07-31T08:16:50.323 回答