I am having an issue with using TabHost in a new Intent of type TabActivity which I hope you can point me in the right direction. Funnily it works fine when I try to view it
I have previously constructed tabhosts with an id of android:id="@+id/tabhost"
. Does this work for you?
You could also consider constructing your tab view programmatically:
TabHost t = getTabHost();
TabSpec tab = t.newTabSpec(label)
.setIndicator(label, icon)
.setContent(intent);
t.addTab(tab);
even though i had changed my main.xml to use android:id="@android:id/tabhost"
like the error stated, it kept trying to use the old name. finally i found the file res/layout-port/main.xml that was identical to main.xml except used the wrong android:id. i must have added a portrait view accidentally and it was holding on to the old value. either fixing the portrait file or removing it fixes my problem.
I had this issue along with 'ERROR: Unknown option '--no-crunch''. If you updated ADT plug-in in Eclipse but have not updated the SDK at the same time. Updating the SDK Manager in Eclipse, fixed the issue for me.
"public class NextActivity extends TabActivity"
--change TabActivity to ActivityGroup.
when problem happen when you want wo run tabhost in tabhost.it is ok.
I had copied and pasted code and noticed that in the id attribute I had:
android:id="@+id/tabs"
when what I really wanted was:
android:id="@android:id/tabs"
I had the same problem. Luckily there was a quick fix:
R
file.