The hierarchy of the type activity is inconsistent when extending ActionBarActivity

有些话、适合烂在心里 提交于 2019-12-21 09:15:08

问题


Hi I've got new v7 support library with appcompat actionbar and when I want to extend from ActionBarActivity as documented here, eclipse show me this error

The hierarchy of the type testActivity is inconsistent

and when I move my courser on ActionBarActivity class it says

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

now how can I Solve this issue?


回答1:


you should use new support v4 library that just has been released in sdk v18




回答2:


I run in exactly the same issue and find thanks to tyczj a better solution, I think. If you have correctly setup the v7 library: http://developer.android.com/tools/support-library/setup.html#add-library You should NOT need to add again the v4 since it is included in v7 folder.

(Since you add the new v4 to solve your problem, I suppose you did not really use the one from v7 because in the v7 it IS the new one)

My post: If I use new " V7 Appcompat library ", do I still need " V4 Support Library " for a minimum SDK = 7?



来源:https://stackoverflow.com/questions/17851515/the-hierarchy-of-the-type-activity-is-inconsistent-when-extending-actionbaractiv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!