0

I am building android application in which I have imported one of the maven library from this link https://github.com/devnied/EMV-NFC-Paycard-Enrollment.My project name is Nfcs and I have no errors in the project and I have added all of the dependencies in my project successfully but when I run the project error window opens saying "Your projects contains error please fix them before running".Please help me find out the error... enter image description here

enter image description here

pom.xml of the library project.

<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>
  • Do you have some items undelined in red in the "Package Explorer" window? – Remy San Aug 20 '14 at 19:46
  • sorry please check my edit @Rems –  Aug 20 '14 at 19:48
  • This is strange... If you're working with Maven, you should have a pom.xml file somewhere. This file describes the Maven is going to build your project, or basically generate your .apk . Don't you have that somewhere? – Remy San Aug 20 '14 at 19:51
  • BTW, as I told you in one of your previous post, Eclipse is not the best choice to work with Maven. But now I have official proof that Maven Build is not supported by the Eclipse Android Plugin... Check this: [Android Studio vs. ADT comparison](http://developer.android.com/sdk/installing/studio.html). Check the first table. – Remy San Aug 20 '14 at 19:53
  • My project is standard android project not maven but the library project I am importing as you can see in the picture is the mavens project.It has the pom.xml. –  Aug 20 '14 at 19:53
  • please help me out to fix this.Do something @Rems –  Aug 20 '14 at 19:54
  • OH ok, so forget my previous comment. Could you show me the pom.xml file? – Remy San Aug 20 '14 at 19:55
  • And the whole error message (because it's cropped in the screenshot) – Remy San Aug 20 '14 at 19:57
  • see the error picture in edit @Rems –  Aug 20 '14 at 20:00
  • 2
    Have you tried, as the error message suggest, to right click on the _Maven_ project > Maven > Update Project? – Remy San Aug 20 '14 at 20:05
  • Hahah <3 If it helped you , let me type a proper answer :) – Remy San Aug 20 '14 at 20:15

1 Answers1

1

You error message says:

... Run Maven->Update Project or Use Quick Fix.

As you see the error is on your Maven Project, you should follow the hint Eclipse is giving you! And Right Click on your Maven Project > Maven > Update Project.

Usually, Eclipse hints are quite usefull.

Read this post to understand what this function is used for. You have to keep in mind that Maven is not the 'native' build manager in Eclipse and therefore needs a little adaptation and additional operations in order for it to work properly.

Community
  • 1
  • 1
Remy San
  • 525
  • 1
  • 4
  • 24