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

前端 未结 5 1436
谎友^
谎友^ 2020-12-06 02:30

I have a problem:

Java Code

public class VisualizzaListaActivity extends TabActivity {
/** Called when the activity is first created         


        
相关标签:
5条回答
  • 2020-12-06 03:11

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

    0 讨论(0)
  • 2020-12-06 03:14

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

    0 讨论(0)
  • 2020-12-06 03:18

    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.

    0 讨论(0)
  • 2020-12-06 03:21

    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.

    0 讨论(0)
  • 2020-12-06 03:33

    I believe the message means this:

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

    should be changed to:

         <TabHost android:id="@android:id/tabhost"
    
    0 讨论(0)
提交回复
热议问题