扩展ActionBarActivity时,类型活动的层次结构不一致

时间:2013-07-25 07:21:58

标签: android android-support-library android-actionbar-compat

您好我有appcompat操作栏的新v7支持库,当我想从ActionBarActivity扩展时记录here,eclipse告诉我这个错误

The hierarchy of the type testActivity is inconsistent

当我在ActionBarActivity类上移动我的courser时,它说

The type android.support.v4.app.TaskStackBuilder$SupportParentable cannot be resolved. It is indirectly referenced from required .class files

现在我该如何解决这个问题?

2 个答案:

答案 0 :(得分:20)

您应该使用刚刚在sdk v18中发布的新支持v4库

答案 1 :(得分:4)

我运行完全相同的问题,并且感谢tyczj一个更好的解决方案,我想。如果您已正确设置v7库:http://developer.android.com/tools/support-library/setup.html#add-library您不需要再次添加v4,因为它包含在v7文件夹中。

(因为你添加新的v4来解决你的问题,我想你并没有真正使用v7中的那个,因为在v7中它是新的)

我的帖子:If I use new " V7 Appcompat library ", do I still need " V4 Support Library " for a minimum SDK = 7?

相关问题