语法错误,插入";" 在Android中完成声明?

Gop*_*ath 3 error-handling android android-tabhost

对Android项目来说是一个新手.我试着TabHost在Android中使用控制器.我有这个链接的代码,coderzheaven.com.但是,在这段代码中,我收到了一个错误Syntax error, insert ";" to complete.这是我的代码,

package tab.fragment;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

    public class TabBarSample extends TabActivity 
    {
        @Override
        public void onCreate(Bundle savedInstanceState) 
        {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);

            TabHost tabHost = (TabHost)findViewById(android.R.id.tabhost);

            TabSpec firstTabSpec = tabHost.newTabSpec("tab_id1");
            TabSpec secondTabSpec = tabHost.newTabSpec("tab_id2");
            TabSpec thirdTabSpec = tabHost.newTabSpec("tab_id3");

            firstTabSpec.setIndicator("Time").setContent(new Intent(this,Time.class));
            secondTabSpec.setIndicator("Date").setContent(new Intent(this,Date.class));
            thirdTabSpec.setIndicator("Option").setContent(new Intent(this,Option.class));

            tabHost.addTab(firstTabSpec);
            tabHost.addTab(secondTabSpec);
            tabHost.addTab(thirdTabSpec); //Here the error occuring..
        }
    }
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点?请帮我.提前致谢.

Try*_*ain 6

事实上,它实际上并不是;导致问题的原因,而是一个错过的结束}