Reputation: 1415
I am trying to add Support Library v7 to my clean android project as support library (with resources). I followed every instruction here: http://developer.android.com/tools/support-library/setup.html#download and android.support.v7.* package is not visible in my main project.
Here is library reference in main project:
Support library project tree:
Support library project build path:
And finally, my main project tree
I don't see any errors in Problems tab, app compiles and runs normally but i cannot import android.support.v7 package which apparently isn't in build path in main project. I went through instruction twice in clean projects/workspace. I cleaned project, restarted Eclipse and nothing... All resources from library project are unreachable too.
Thanks in advance :)
Upvotes: 5
Views: 33010
Reputation: 1728
It looks like android-support-v7-appcompat.jar is missing from your libs folder.
When you download the Android Support Library through the Android SDK Manager it makes the support .jar files you need available under {SDK Location}\extra\android\support.
To use the v7 files, copy these to your project's /libs folder.
Typical gotchas (this looks OK in your setup):
For more information about using the support V7 package (including running the v7 samples) can be found at the RHM Guide to Android Support Lib.
Upvotes: 4
Reputation: 211
The issue seems to be in Absolute path in case of Windows base machine. I faced the issue of referencing support libraries When I moved Eclipse and related libraries to different drive than where the project was. Copy paste the libraries to folder on same derive in a way that it can pick by relative path. ..\androidCommonlib\appcompat android.library
Upvotes: 0
Reputation: 133560
Copy the library project to the folder where your android project is.
Select File > Import.
Select Existing Android Code Into Workspace and click Next.
Browse and import the same to eclipse
Once the library project is imported you can refer the same in your android project.
This is similar to setting up google play services in eclipse described here. Check the 4th step
http://developer.android.com/google/play-services/setup.html
Upvotes: 8