Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'

匆匆过客 提交于 2019-11-27 22:27:29

Try cleaning your build from the Project > Clean... menu if you are using Eclipse. Sounds simple but often fixes this problem.

Rupesh

I believe the message means this:

     <TabHost android:id="@+id/tabhost"

should be changed to:

     <TabHost android:id="@android:id/tabhost"

Only thing you need to change is android:id attribute in layout xml , It should be " android:id="@android:id/tabhost" "

I had the same problem. Actually I extended TabActivity for DaAcquistareActivity class. This was the reason. I solved the problem by extending DaAcquistareActivity with Activity and not with TabActivity.

Solution. If you're switching to a new Activity check it extends, perhaps on reflex copied from the primary, and there is a TabActivity, but we need Activity or other activity.

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