tabhost.addTab()在android 2.3下没有问题,在android4.0.8下报错:
android.content.res.Resources$NotFoundException: Resource ID #0x0

解决方案 »

  1.   

    如果你是用纯代码构建的,可以尝试使用这种方式实例化对象吧TabHost myTabHost = new TabHost(getContext(), null); 我也是遇到这个问题,使用这个访问解决问题了
      

  2.   

    如果是xml配置文件构建项目就比较麻烦了,这是英文版的地址,你可以尝试他介绍的方法,我没测试过http://stackoverflow.com/questions/11758898/tabhost-in-android-4-doesnt-work