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 6777405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:08:38+00:00 2026-05-26T16:08:38+00:00

This one has me stumped. I’m clearly missing something, but I can’t figure out

  • 0

This one has me stumped. I’m clearly missing something, but I can’t figure out what.

I have a library (not an Android library – just a regular Java library project), which in turn uses other libraries. So, the setup is:

myApi.jar

   |
   +-- com/myapi/ ... (.class files here).
   | 
   +-- libs/
        |
        +-- lib1.jar
        +-- lib2.jar

Now, when I include myApi.jar in a project in the libs directory of an Android project, like MyAndroidProject/libs, only the com.myapi. ... classes are getting included in the classes.dex file. The classes from the lib1.jar and lib2.jar are not included in classes.dex

The obvious work-around is to remove the lib1.jar and lib2.jar from the myApi.jar file; and instead place them in MyAndroidProject/libs too. However, this means the users of myApi now have to know that there are additional JAR files to be placed on the build path. This is something I am looking to avoid.

So, is there anything special I need to do to include JAR files being used internally by a library JAR in the classes.dex file?

  • 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-05-26T16:08:38+00:00Added an answer on May 26, 2026 at 4:08 pm

    However, this means the users of myApi now have to know that there are additional JAR files to be placed on the build path. This is something I am looking to avoid.

    Here, Android’s behavior is identical to ordinary Java’s — if myApi.jar were in support of a Swing app, you would need to either distribute all the JARs or merge all the JARs into one. Same thing with Android. You are welcome to fold all the classes from the dependent JARs into your own, or have projects reusing your JAR also add your dependencies as their own dependencies.

    Note that merging JAR contents may have technical or licensing impacts, so make sure this is something you really want to do.

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

Sidebar

Related Questions

This one really has me stumped. I have not ran across this problem on
This one really has me stumped. I have a documents table which hold info
This one has me stumped, and none of the other related questions here have
Okay this one has me stumped.. mainly because i have been working on this
This one has me stumped. I have two Windows installations of PHP: 32-bit on
I've dealt with WP js conflicts before, but this one has me stumped. I
So...this one has me stumped. I am using VS 2008 (C#). I have some
I'm fairly experienced with Oracle analytic functions but this one has stumped me. I'll
This one has me stumped. I've got a java.sql.ResultSet and I'm pulling string values
This one has me stumped. <div id=container> <div id=store></div> <div id=contact></div> </div> I'm looking

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.