Java – Android – gettabhost() undefined

I started learning Java and how to program for Android last night:)

So far, I'm reading this tutorial: developer.android.com/resources/tutorials/views/hello-tabwidget.html

Obviously, these tutorials are designed for people who already have Java experience

Although the tutorial lacks all the necessary steps (for absolute beginners of Java) and even has a typo, it seems that I have figured out everything (I'm really proud: P). Except that I can't figure out how to fix tabhost, tabhost = gettabhost(); This is clearly uncertain

I showed another error in the link image below, but I don't understand why

This is linked image

Thank you, Gareth

resolvent:

You just missed step 5 of this tutorial

Another error is caused by capital t on tabhost. You want: tabhost. Addtab (SPEC);

Java is case sensitive, so it is different (calling the non existant static method of the tabhost class is different from calling the instance method on the object referenced by the tabhost variable)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>