Android 未为SherlockFragment类型定义ActivityCreated(bundle)方法
我正在尝试执行一个实现actionBarSherlock的项目,我已将库正确添加到该项目中,但出现以下错误:Android 未为SherlockFragment类型定义ActivityCreated(bundle)方法,android,actionbarsherlock,bundle,undefined,Android,Actionbarsherlock,Bundle,Undefined,我正在尝试执行一个实现actionBarSherlock的项目,我已将库正确添加到该项目中,但出现以下错误: The method onActivityCreated(bundle) is undefined for the type SherlockFragment 这是项目中的代码: public class A_class extends SherlockFragment implements OnClickListener { ... } 我想答案很简单,但我想不出来。有什么
The method onActivityCreated(bundle) is undefined for the type SherlockFragment
这是项目中的代码:
public class A_class extends SherlockFragment implements
OnClickListener { ... }
我想答案很简单,但我想不出来。有什么想法吗?有两种方法:
如果要使用具有sherlock功能的片段,请使用SherlockFragment
。在这种情况下,您不能有与活动相关的方法,因为它是一个“片段”
否则,您正在查找《夏洛克碎片活动》是的,没关系……但您可以通过单击我答案左侧的右标记来接受答案。很高兴我能帮忙