tabHost.addTab(tabHost.newTabSpec("tab1")
.setIndicator("快速发布", getResources().getDrawable(R.drawable.publish))
.setContent(intentPublish)
);
为什么会出错,要添加什么了吗

解决方案 »

  1.   

    tabHost.addTab(tabHost.newTabSpec("tab1")
    .setIndicator("快速发布", getResources().getDrawable(R.drawable.publish))
    .setContent(intentPublish)
    );这一段代码有问题的只可能是intentPublish,这是什么?是在xml里面定义的id吗,还是其他?
      

  2.   

    super.onCreate(savedInstanceState);
    Intent intent = getIntent(); //获得启动该Activity的Intent
    uno = intent.getStringExtra("uno");
    final TabHost tabHost = getTabHost();
    Intent intentPublish = new Intent(this,wtf.wpf.PublishActivity.class);
    intentPublish.putExtra("uno", uno);
    intentPublish是我定义的
      

  3.   

    错误是,当我点击登录的时候会中止,转不到个人中心,个人中心的activity已经添加androidmainfest了,我看日志看到错误就提示在上面的那个,还有日志怎么发,怎么不能复制的
      

  4.   

    改成这样试试,我以前这样是没有问题的……
    super.onCreate(savedInstanceState);
    uno = (String) this.getIntent().getExtras().get("uno");
    final TabHost tabHost = getTabHost();
    Intent intentPublish = new Intent(this,wtf.wpf.PublishActivity.class);
    intentPublish.putExtra("uno", uno);
      

  5.   

    发布微薄只需要这个函数,weibo.updateStatus(content);