4

I have created an Android Library. That has all the main code. Also I have created a project called App1. I have referenced the library through maven in the App1. Also I have made it reference through the Project->Properties->Android-> Reference to the library.

When I build the project through cygwin using "mvn install" I get following error.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project App1: Compilation failure: Compil
ation failure:
[ERROR] \LIBRARYPROJECT\Branding-Private\App1\src\main\java\comxyz\main\AApplication.java:[3,42] cannot find symbol
[ERROR] symbol  : class AApplication

**This class AAplication is in the Library project. It is not able to reference it. This project was able to reference it without maven before. After using maven it is not able to reference it.

Can anyone help?

Thanks, Sneha

2 Answers 2

3

You can try maven-android-plugin ApkLib.

Sign up to request clarification or add additional context in comments.

Comments

0

You need install the library project into local repository, because the reference library is not built when using maven.

1) Install the library into local repository like this:

-Dfile means where your .jar is.

mvn install:install-file \
    -DgroupId=com.admogo \
    -DartifactId=AdsMOGO-SDK \
    -Dpackaging=jar \
    -Dversion=1.0 \
    -Dfile=AdsMOGO-SDK-Android.jar \
    -DgeneratePom=true

2) Add the dependency in your pom.xml file like this:

<dependency>
    <groupId>com.admogo</groupId>
    <artifactId>AdsMOGO-SDK</artifactId>
    <version>1.1</version>
</dependency>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.