简体   繁体   中英

Your projects contains error please fix them before running:Eclipse

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... 在此处输入图片说明

在此处输入图片说明

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>

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM