ActionBarSherlock AndroidManifest.xml 和其他文件在导入时丢失
我想尝试 ActionBarSherlock 库,但无论我尝试什么,要么我的项目得到红色感叹号,要么 sherlock 得到红色感叹号,要么 sherlock 得到错误,或者我得到“[2011-11-09 18: 59:29 - Library-ActionBarSherlock] AndroidManifest.xml 文件丢失!”等...
我不断地打开、关闭、清理、“修复项目属性”。我已经在我真正想要使用它的应用程序上尝试过它,并且我在一个全新的项目中尝试过它,除了库之外,工作区中没有其他东西。
我真的不知道该尝试什么,也不知道我做错了什么,让它看起来如此挑剔。
编辑: 例如,现在 sherlock 有一个红色 x ,其中缺少清单错误,而我的项目有一个红色感叹号,当我去构建路径时,错误是“actionbarsherlock.jar - ...(missing)”。
I'd like to try the ActionBarSherlock library, but no matter what I try either my project gets the red exclamation point, or sherlock gets the red exclamation point, or sherlock gets errors, or I get "[2011-11-09 18:59:29 - Library-ActionBarSherlock] AndroidManifest.xml file missing!", etc...
I constantly open, close, clean, "fix project properties". I've tried it on the app i actually want to use it on and ive tried it with a brand new project with nothing else in the workspace but the library.
I really don't know what to try or what I'm doing wrong to make it seem so finicky.
EDIT:
for example, right now sherlock has a red x with the missing manifest error and my project has a red exclamation point and when i go to build path the error is "actionbarsherlock.jar - ...(missing)".
EDIT2:
I've looked many place including here, here, here, and here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
固定的。以下注释由 Gintautas Miliauskas 于 2010 年 12 月 10 日 15:46 发表于 此网页。因此,基本上将源代码复制到 Eclipse 工作区之外的文件夹中,从现有源代码创建 Android 项目,源代码是库文件夹。这将清除缺少 AndroidManifest.xml 错误。之后可以通过右键>将项目移动到工作区。重构>修复
了丢失的 AndroidManifest.xml 文件 - 现在出现错误:
ActionMenuItem 类型必须实现继承的抽象方法 MenuItem.expandActionView()ActionMenuItem.java
/ActionBarSherlock/src/com/actionbarsherlock/internal/view/menu 第 11 行 Java 问题
这些错误的负载。将开始调查他们。也无法实例化类型 MenuItemWrapper ActionBarWrapper.java。在将 ActionBarSherlock 从 Android 4.0 切换到 Android 3.2 后,这些问题就消失了。
Fixed. Following note made by Gintautas Miliauskas Dec 10 '10 at 15:46 on this web page. So basically copy the source to a folder outside the Eclipse workspace, Create Android Project from Existing Source with the source being the library folder. This clears the missing AndroidManifest.xml error. After than the project can be moved to the workspace through Right Click > Refactor > Move
Having fixed the missing AndroidManifest.xml file - now getting erorrs :
The type ActionMenuItem must implement the inherited abstract method MenuItem.expandActionView()ActionMenuItem.java
/ActionBarSherlock/src/com/actionbarsherlock/internal/view/menu line 11 Java Problem
Loads of these errors. Will start to look into them. Also Cannot instantiate the type MenuItemWrapper ActionBarWrapper.java. These went away after changing ActionBarSherlock to switch from Android 4.0 to Android 3.2.
确保当您引入项目时,您的目标 API 是 3.2。它不能与任何其他目标 API 一起使用。我最近在解决这个问题
Make sure that when you bring in the project, your target API is 3.2. It will not work with any other target API. I recently struggled with this exact problem
当我第一次尝试安装 ActionBarSherlock 时,我遇到了同样的问题。
我的解决方案是
I had the same problem when I first tried installing ActionBarSherlock.
My solution was to
如果您在将 Sherlock 库导入 ecliple 时遇到问题并缺少清单和其他文件,那么我有一个简单的解决方法。
我不知道为什么会发生这种情况。但现在我可以在我所有的机器上解决这个问题。
基本上我们将使用 Android 导入然后 eclipse 导入来导入相同的项目。
Android 项目
现有源中的现有项目
,然后选择文件夹Your-Sherlock-Project-Path/library
,继续并点击结束。导入现有文件系统
选择与步骤 2 相同的文件夹。确保您的进入文件夹
来自步骤 2干杯。
If you are having trouble importing Sherlock library to ecliple and getting missing manifest and other files then I have a simple workaround.
I am not sure why this is happening. But now I am able to solve this on all my machines.
Basically we are going to import same project using Android import and then eclipse import.
Android Project
existing project from existing source
and select the folderYour-Sherlock-Project-Path/library
, continue and hit Finish.import existing file system
Select the same folder from step 2. Make sure yourinto folder
is from Step 2Cheers.