Problem running android HelloTabWidget example - NullPointerException on addTab()

后端 未结 12 1170
陌清茗
陌清茗 2021-01-13 17:17

I\'ve tried the Tab Layout example, and I\'ve also fixed the few typos in the example (and added all the activities to the manifest). However, when I run it on the emulator

12条回答
  •  温柔的废话
    2021-01-13 17:34

    This is what worked for me:

    I changed this line to use "artists" tabHost.setCurrentTabByTag("artists");

    And then added a "." in front of TabAndroid(the main activity name) and added the three activities that Ngetha suggested.

    
    

提交回复
热议问题