Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9010209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:23:51+00:00 2026-06-16T02:23:51+00:00

My android application depends on an android library project which comes from a 3rd

  • 0

My android application depends on an android library project which comes from a 3rd party. I am switching my build environment over to maven and following the samples has gone fairly smooth but the last step is this. I don’t understand what I actually need to do. I’ve read the apklib page here. I’ve never seen a document dance around what you actually do better than this document. It contains 1 snippet of how you reference an apklib but no information at all about how you actually generate it?

Also, my project structure looks like this

/projectroot/app   (main application android project source code)
/projectroot/shared/lib1  
/projectroot/shared/lib2 (3rd party lib i don't want to create pom.xml for)

I have projectroot/pom.xml with a modules section like so:

<modules>
    <module>shared/lib1</module>
    <module>shared/lib2</module>
    <module>app</module>
</modules>

Is this the correct? In all the module examples I see they refer to folders direct children whereas mine are nested further.

Main thing I’m looking for is how to make lib2 an apklib to reference from app/pom.xml.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:23:52+00:00Added an answer on June 16, 2026 at 2:23 am

    It is mentioned in the link you referenced:

    Compatible with non-Maven Android Library Projects!

    The generated .apklib file will have the layout of a standard Android/Eclipse library project. This means that regardless of your Maven layout, the layout inside the .apklib file will be that source code is in "src/" instead of "src/main/java/", but still interpreted correctly when used in an Android/Maven application project. This is to be compatible with non-Maven developers’ library projects, which is important to grow the Android developer community.

    Use other non-Maven developers’ libraries

    It also means we can take any external Android library project zip file (from non-Maven developers) and do mvn install:install-file … on it and simply start using it as a dependency.

    Share your .apklib with non-Maven developers

    To share your .apklib file with a non-Maven developer, they will probably feel more comfortable if you rename it to .zip. They can then simply unpack it in a directory and use it from there.

    If it is a mavenized Android library project, simply run mvn clean install to create the apklib and get it installed in your local Maven repository.

    If it is a regular Android library project, simply zip the project folder (better to strip all unnecessary IDE generated files), rename my-lib.zip to my-lib.apklib, then run mvn install:install-file to install my-lib.apklib into your local Maven repository.

    Note that in your multi-module maven project, if the child module lib2 is not mavenized, you may get some configuration error when running maven build, it is called multi-module Maven project after all so does not make much sense to include a non-mavenized child project. If the lib2 is not mavenized yet, either mavenize it as part of the mutli-module maven project or remove it from mutli-module maven project and maintain it separately (from both command-line build via apklib and IDE development via the source).

    Also note that project building in Maven and Eclipse are totally different story, if you are creating/importing the project into IDE, you need the library project source anyway. If lib2 is mavenized as part of the multi-module project, it will be imported and setup automatically when import the parent project, otherwise, you may need import and setup the standalone project manually. Check out this answer and this answer for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Android application which depends on the value returned by a webservice.
I am working on an Android version 2.3.3 application which depends on SMS for
My android application takes sms messages from a BroadcastReceiver and copies the message into
My Android application uses Java OAuth library, found here for authorization on Twitter. I
The app I'm currently developing depends on a third party application (OIFileManager). My question
I'm developing an Android library ( SiriRestClient ) whose artifacts are managed via Maven,
My android application need to print over wifi printer.Here wifi printer will be connected
My Android application is expecting and array of usernames from my WCF Service using
I have an Android project that depends on a non-Android JAR that contains resources
For an industrial application which is installed and shipped on Android devices, I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.