Girish M
Girish M

Reputation: 11

How to import and call a library project from an Eclipse ADT application project?

I built an android project in eclipse-SDK-3.7.2-win32-x86_64. From here on this project is referred to as Libexample. It is a simple "hello world" project. I run it. I got the expected result on the android virtual device.

Now, I have made Libexample a library project by checking the 'Is Library' field in its properties. I built another project, from here on referred to as Appexample. I would like to call the library project Libexample from Appexample. As a first step, I have added Libexample as a reference to Appexample in the properties for Appexample. But, I am not finding a way by which I can import and call Libexample from Appexample.

Running Appexample (in which there is a call to Libexample) should yield the same result as I got by running Libexample.

Can anyone give Me an idea to make this work the way I want it to ??

Upvotes: 1

Views: 2586

Answers (1)

njzk2
njzk2

Reputation: 39406

to add a library, you go in the properties of the project, under the tab 'android', in the library section, add the library and make sure there is a green tick next to it.

secondly, beware. importing a library does not import anything in the project manifest. you have to add elements to the manifest yourself if you need, like, activities or services from the library

Upvotes: 2

Related Questions