简体   繁体   中英

Can't add library to my android project

I'm creating a new app and I want to use some libraries like this: https://github.com/JakeWharton/Android-ViewPagerIndicator

I had downloaded this library, added it to my workspace using New Android Project -> Create from existig source. Went to properties > android, and checked Is Library . Then I went to properties > android in my app project, and clicked add on the Libraries section, and chose the library, and It show me the library with a green V near it. I've clicked ok, but couldn't use the library so I've opened the properties > android again, and there was a red cross near the library, and '?' under the "Project" column.

I can't understand why it's happening! It's really annoying, happened to me when I tried to add facebook API to my app, and I just gave up and copied the source to my project.

Thanks, Elad!

Copy every Library manually inside Eclipse Workspace, before importing it, as Eclipse seems to be silly if the Library lays somewhere else. Also symlinking a Library will not work.

For me, I just restart the eclipse and the added library works fine.

I mean first time it showing red marks after adding the library project. Though eclipse main project and library project are in same workspace folder and no resources files are in outside of the project folder.

So, you can try with to restart your eclipse. Happy coding....

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM