简体   繁体   English

无法将Android库引用到我的项目中

[英]Can't reference an Android library into my project

I would like to use the android project PagerSliding 我想使用android项目PagerSliding

I have imported it into my workspace. 我已将其导入我的工作区。 After that I get into MY project properties add a library, and then click apply and ok, so I get : 之后我进入我的项目属性添加一个库,然后单击应用并确定,所以我得到:

步骤1

If I reopen MY project properties right after here's what I get (Eclipse seems to loose the reference to the library). 如果我在这之后立即重新打开我的项目属性(Eclipse似乎放弃了对库的引用)。

第2步

FYI : I did have 2 workspaces before, but now I'm using only one. 仅供参考:之前我确实有2个工作区,但现在我只使用了一个工作区。

I have resolved to issue by removing eclipse, and reinstalling, seems to be a Eclipse bug when previously using 2 workspaces... 我已经决定通过删除eclipse并重新安装来解决,在以前使用2个工作区时似乎是一个Eclipse bug ...

According to this question SO Link 根据这个问题SO Link

删除项目并再次导入它对我有用。

i had the same problem there when i try to change my workspace so this my solution: 当我尝试更改我的工作区时,我遇到了同样的问题,这是我的解决方案:

1. import and copy all project data including library project into workspace
2. delete the old project reference by Right-click on the project-->Properties-->Android-->Library, and select corrupted library(so that waht i call it) and choose Remove
3. clean project first (to refresh ur project properties)
4. go to library project Properties-->Android-->Library and check the is library if it does'nt click Apply then OK
5. if the library project is library is already checked, first Unchecked it then Clean the library project after that do the Step 4 again
6. go to project that u want the library are in then Right-click on the project-->Properties-->Android-->Library, Add then choose the library project (it should be there) and click Apply then OK
7. if still doesn't appear clean the project once more time and that should do

thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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