I am trying to add a Library to an existing project inside eclipse. I am keeping the Project Folder itself and the Library Folder in a folder marked "ANDROID" on my desktop. When I try to Import > Existing Code into Workspace > Select "ANDROID".. the only project that gets added is the App itself and NOT the library. I even try to add the library on its own and it will show up on the import list but will not have a "ticked box" with the option of "Finish". I even right clicked my App - Properties > Android > and noticed that the library is there with a red "X" and does not allow me to search for a new library. What am I doing wrong? This Identical App and library is working with the same version of eclipse for a friend and not me.
Navigate to File > Project Structure > Dependencies. In the Declared Dependencies tab, click and select Library Dependency in the dropdown. In the Add Library Dependency dialog, use the search box to find the library to add.
Make sure that the libraries and the project are at the same place, i.e.
Is Library
If this does not work for you copy the jar files from its lib folder and paste it in the projects lib. This should only be done if the above method doesn't work
Import Library project in eclipse . Then right click on project and go to properties->Android (Menu on left side) --> At the bottom(below project build target) you will see a check box named is Library Check that box. Now you've made your project a library .
Then in your orignal project where you want to add library go again to to properties->Android (Menu on left side) --> At the bottom(below project build target) Click add button and you will find that library project visible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With