Reputation: 1721
I have an Android project in which I'd like to use the appcompat library. I have read the following posts and followed their advice:
When trying to add the library project to my project, I get a green check indicating all is fine (see pic 1 below). After I press OK and open Properties again, this green check is replaced with a red X and there doesn't seem to be a way to get a textual error message (see pic 2). In pic 3 you see what libraries are on the Java build path.
Pics: https://i.sstatic.net/QgfII.jpg
Needless to say, I can't build my project. The line
android.support.v7.widget.Toolbar t;
gets the error "android.support.v7 cannot be resolved to a type". I don't see where my setup is wrong.
Upvotes: 0
Views: 274
Reputation: 126563
Try importing and copying the library project into your workspace, i think the problems is that the project doesn´t have the appcompat_v7.jar
inside their /bin
folder, thats why you have the red cross.
Upvotes: 1
Reputation: 4187
If i recall correctly you need to ensure the library is stored on the SAME drive letter as eclipse/your project (Probably C:/, looking at that picture, while the lib is on D:/)
edit: Also, you shouldn't really be importing the library project directly from your SDK folders, Google recommend making a copy in your local project directory
Upvotes: 1