Eclipse将无法识别项目作为库(ActionBarSherlock / ViewPagerIndicator) [英] Eclipse will not recognize project as library (ActionBarSherlock/ViewPagerIndicator)

查看:158
本文介绍了Eclipse将无法识别项目作为库(ActionBarSherlock / ViewPagerIndicator)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让 ActionBarSherlock ViewPagerIndicator 库设置为我的项目,但我似乎遇到了一些问题。我给杰克·沃顿(开发者)几个邮件较早它,并得到了一些答复,但未能取得任何进展 - 我认为他得到了忙一些其他的东西。

I'm trying to get ActionBarSherlock and the ViewPagerIndicator libraries set up for my projects, but I seem to be running into a few issues. I sent Jake Wharton (The developer) a few messages earlier about it, and got a few replies but couldn't get anywhere - and I think he got busy with a few other things.

什么我的问题是,对于这两个VPI和ABS

What my issue is, For both VPI and ABS

这两个库打开没有任何错误,而我使用的编译器1.6版所有的要求。

Both libraries open up without any errors, and I'm using compiler version 1.6 for all as is required.

有趣的是,如果我提供的样品中加载 - 它们做工精细,并链接到他的图书馆;但是当我去图书馆添加到我的项目 - 在上述情况发生

The funny thing is, if I load in the samples that are provided - they work fine and link to his library; but when I go to add the library to my project - the above happens.

推荐答案

在何处存储实际的库项目也没有关系,只要你使用相对链接引用它。查看库项目 - 发展的考虑的:

Where to store the actual library project does not matter, as long as you use a relative link to reference it. Check out the Library Projects - Development considerations:

      
  • 库项目的存储位置

         

    有没有你在哪里应该存储库项目,相对于相关的应用程序的项目,只要在应用程序项目可以通过相对链接引用该库项目的具体要求。最重要的是,主要的项目可以通过相对链接引用该库的项目。

  • Library project storage location

    There are no specific requirements on where you should store a library project, relative to a dependent application project, as long as the application project can reference the library project by a relative link. What is important is that the main project can reference the library project through a relative link.

您应该始终使用Eclipse ADT插件来选择和设置库项目参考,IE右键项目 - >属性 - > Android的 - >添加,然后在打开的项目选择窗口,在此选择的图书馆项目清单(原因你应该导入他们在同一个Eclipse工作区作为主项目)。这将使用在Android preference窗口相对路径到project.properties以及节目相对路径添加android.library.reference:

You should always use the Eclipse ADT plugin to select and set up Library Project Reference, i.e. right-click project -> Properties -> Android -> Add, then in the opened Project Selection window, select the Library Project list here (of cause you should import them in the same Eclipse workspace as your Main Project). This will add a android.library.reference using relative path into project.properties as well as show relative path in the Android preference window:

android.library.reference.2=../../../../../Documents and Settings/yorkw/Desktop/JakeWharton-Android-ViewPagerIndicator-f09acb0/library

如果您使用的是从project.properties如下绝对路径直接改变它:

If you directly alter it using absolute path from project.properties as below:

android.library.reference.1=C:\\Documents and Settings\\yorkw\\Desktop\\JakeWharton-Android-ViewPagerIndicator-f09acb0\\library

再经过Eclipse中刷新项目,你在你的问题中描述的具体错误,请参阅下面我的截图:

Then after Eclipse refresh your project, you get the exact error described in your question, see my screenshot below:

希望这有助于。

这篇关于Eclipse将无法识别项目作为库(ActionBarSherlock / ViewPagerIndicator)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆