【发布时间】:2014-08-20 19:44:00
【问题描述】:
我正在构建 android 应用程序,在该应用程序中,我从该链接导入了一个 maven 库https://github.com/devnied/EMV-NFC-Paycard-Enrollment.My 项目名称是 Nfcs,我在项目中没有错误,我已经成功地在我的项目中添加了所有依赖项但是当我运行项目错误窗口打开说“您的项目包含错误,请在运行前修复它们”。请帮我找出错误...
库项目的 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>library</artifactId>
<packaging>jar</packaging>
<name>EMV paycard library</name>
<parent>
<groupId>com.github.devnied.emvnfccard</groupId>
<artifactId>parent</artifactId>
<version>1.1.1-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>com.github.devnied</groupId>
<artifactId>bit-lib4j</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<!-- Unit test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
【问题讨论】:
-
“包资源管理器”窗口中是否有一些未用红色标记的项目?
-
对不起,请检查我的编辑@Rems
-
这很奇怪...如果您正在使用 Maven,您应该在某处有一个 pom.xml 文件。该文件描述了 Maven 将构建您的项目,或者基本上生成您的 .apk 。你没有那个地方吗?
-
顺便说一句,正如我在您之前的一篇文章中告诉您的,Eclipse 不是使用 Maven 的最佳选择。但现在我有官方证据证明 Eclipse Android 插件不支持 Maven Build...检查一下:Android Studio vs. ADT comparison。检查第一个表。
-
您是否尝试过按照错误消息提示右键单击 Maven 项目 > Maven > 更新项目?
标签: java android eclipse git maven