10

I want to include this library from github to my existing project, I am using eclipse. Is there any tutorial on how to do this? I am new to android and java development so any step by step help would be great!

note: I have an Egit plugin installed in eclipse.


Image of the screen when I try to Import the library from the unziped file I have downloaded from the github page: enter image description here


Also after importing the library as suggested below a library folder created in my Package Explorer but here is what I get: enter image description here


I have now the library in the eclipse Package explorer, and now I want to add it to my project, so I Right-Click on the existing project and choose properties. Under Android liabrary i click ok and choose the library than ok, nothing happens!

vlio20
  • 8,955
  • 18
  • 95
  • 180
  • do you want to add .jar file only or whole project as library? – Pratik Sharma Dec 15 '12 at 11:29
  • 1
    It is an Android library project, simply download the source, import and setup it in Eclipse, then [reference it in your own project](http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject). – yorkw Dec 15 '12 at 11:40
  • It also has to be imported in same workspace as your project . – Snicolas Dec 15 '12 at 11:41

3 Answers3

1

Right click on your project -> properties -> Android -> Add. There you can hose a library.

enter image description here

Ahmad
  • 69,608
  • 17
  • 111
  • 137
  • after I have imported the library I am getting this (have added an image to the question). – vlio20 Dec 15 '12 at 12:31
  • You can't import the lib because you have an other project (library presumably) who's name is the name is also "library". Right click on that other project -> refactor -> rename. – Ahmad Dec 15 '12 at 12:35
  • did it, but still not working. If you could do a step by step process from the github project download to implementation it would be great (I know it is to much to ask for). – vlio20 Dec 15 '12 at 12:43
  • Was there an other project with the same name("library") in your **workspace**? – Ahmad Dec 15 '12 at 12:44
  • yes, but it was the project that I have imported from the github I wanted – vlio20 Dec 15 '12 at 12:45
  • Here is what I have done step by step: 1. downloaded the zip file from github. 2. unzipped it. 3. clicked right mouse button on my project folder and than clicked android -> Existing android code Into Workspace -> next. 4. Root Directory: C:\Users\Vlad\Desktop\android-numberpicker-master. 5. Finish 6. A SampleActivity project created. – vlio20 Dec 15 '12 at 13:00
  • Hmmm so you could import the sample project but not the lib? Or what is your problem? – Ahmad Dec 15 '12 at 13:01
  • Yes, the import doesn't recognize the lib – vlio20 Dec 15 '12 at 13:02
  • Is the lib imported? Or is it just the sample? – Ahmad Dec 15 '12 at 13:03
  • @VladIoffe: import `C:\Users\Vlad\Desktop\android-numberpicker-master\library` instead. – CommonsWare Dec 15 '12 at 13:32
  • says to give at least one project – vlio20 Dec 15 '12 at 13:52
0

Extract the zip,

Right click in your workspace -> Import -> Android -> Existing Android Code Into Workspace -> give path of that project/library

Done.

Lalit Poptani
  • 67,150
  • 23
  • 161
  • 242
0

I got the same problem as yours, please check my answer here , hope it helps.

Community
  • 1
  • 1
Shawn
  • 456
  • 5
  • 11