NoClassDefFoundError的机器人与ActionBarActivity人与、机器、NoClassDefFoundError、ActionBarActivity

2023-09-12 04:50:15 作者:曾经如今换来今朝/*

目前,我有一个 ActionBarActivity 它总是返回的NoClassDefFoundError 。我读过,这可能是与ADT一个问题,但我不能肯定,因此我的问题。我已经导入从Android样的动作条样品在

I currently have an ActionBarActivity which always returns a NoClassDefFoundError. I've read that it might be a problem with the ADT but I cannot be sure, hence my question. I've imported the ActionBar sample from the Android samples under

Android的SDK \样本\ Android为14 \ ActionBarCompat

我已经贴上了ActionBarCompat项目作为项目下的库 - >属性,但我仍然得到错误

I've labelled the ActionBarCompat project as a library under Project -> Properties but I'm still getting the error.

要reiterator:

To reiterator:

public class SearchActivity extends ActionBarActivity { // Doesn't work, yields exception

public class SearchActivity extends Activity { // Works perfectly

任何人都经历了类似的错误,也许找到了一个解决方案吗?

Has anyone else experienced a similar error and perhaps found a solution?

在此先感谢。

推荐答案

结束了使用ActionBarSherlock代替,并添加在项目属性,以及在构建路径的项目引用。似乎已经解决了关于我的问题的所有错误。

Ended up using ActionBarSherlock instead and added a project reference under Project Properties as well as in the Build Path. Seems to have fixed all errors relating to my question.

 
精彩推荐
图片推荐