Reputation: 1323
I am trying to add a library project as detailed on http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject
Last week I could do it but now all of a sudden I cannot reference any library project:
As you can see everything in the "Project Selection" window is disabled. This is the window I get when I click on Properties -> Android -> Add.. (in the Library widget group). I tried reinstalling eclipse and creating a new project but no luck.
I am trying to install the "Google Play services" extra (which shows as downloaded under Android SDK Manager).
Does anyone know how to solve this issue?
Upvotes: 3
Views: 2440
Reputation: 1950
You need to import library project into your work space 1.Right Click on project go to import 2.Existing android code into work space 3.Browse for directory just go to the sdk and extra and add the project 4.Important thing is that tick the copy project into work space and finish. 5.After that go to project properties and android and add the library project then apply
its works fine for me
Upvotes: 0
Reputation: 1323
How stupid, I just needed to first import the project library into eclipse before being able to reference it. The file was under:
adt-bundle-windows-x86_64-20130219\sdk\extras\google\google_play_services
Sorry for the post.
Regards.
Upvotes: 1
Reputation: 937
To add code as a library, you first need to import it into your Eclipse workspace (right-click your Package Explorer, select 'Import...', 'Android', 'Existing Android code into workspace...'.), and then define it as a 'Library', by selecting 'is library' in that project's properties window.
Upvotes: 2
Reputation: 1547
Check if the library project is a library.
go to your library project->properties->Android-> select your checkbox to "is Library"
Upvotes: 2