weakwire
weakwire

Reputation: 9300

Android library project using other 3rd party libraries

I have a library android project "Library" (with activities and all) and a normal android project "App" that uses the "Library" from source code. Library is not compiled seperatly.

Everything works just fine. The problem is using 3rd party compiled jars "External Jars". My "Library" is using all the "External Jars". "App" can access only the "Library". "External Jars" are accessed only by the "Library".

The problem is that "App" needs to have all the "External Jars" in its build path for the app to function properly. What is that neccessery? "App" doesn't call directly any of the "External Jars".

So i have included the Jars to the "App" AND the "Library". Is there any way that "App" don't have to have the "Jars" in it's build path?

I ask this because i worry about additional application size and because i can't get proguard to work that way.

Upvotes: 0

Views: 1147

Answers (1)

Nick Campion
Nick Campion

Reputation: 10479

External library projects that you depend on should include their libraries in their libs directory. The android build process will take care of bringing these in from the library as part of the building of your apk. This sometimes causes issues in eclipse so, even though you have to have eclipse add these jars to "referenced libraries" or the project build path, when you generate the apk, if the library is an android library and its dependencies are in libs, you shouldn't need to do anything special.

Upvotes: 1

Related Questions