4

I have created an Android library where I included some external jars. These jars are seen in "Referenced Libraries" under the library project. When I reference this library in my other project, it is not able to link the jars that had been added to library. It shows errors to the referenced library under the project.

It should have linked the jars which are added in library, rather, it shows an error in the project in which I have added this library. Can anyone help me figure this out?

1
  • Do both the projects lie in the same workspace? Commented Jan 20, 2012 at 11:24

3 Answers 3

3

Exporting jars from library project through the Properties -> Java Build Path -> Order and Export doesn't actually work at the end: Eclipse is able to compile a dependent project, but jars do not appear in the final apk and you get a runtime exception.

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

Comments

1

If you've got your library project properly included, go to Properties -> Java Build Path -> Order and Export and check all the JARs you wish to include in your main project. This should work, if everything's in the same workspace.

2 Comments

I can see the list of jars in the Order and Export in my library. But do not see them in Order and Export of my project. Yes they are in the same workspace
Okay, but are all necessary libraries in your library project checked?
0

Copy the files to your project location, probably in a lib folder. Then try to add the library.

1 Comment

doesn't work... It works if I add all the jars again in the project. But It will be like adding the jars twice, once in library and then in project

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.