使用计时器编写启动画面代码时出错

Error in writing splashscreen code with timer

所以我正在 Android Studio 中编写应用程序,我是初学者。因此,有一个错误导致我的带有计时器的启动画面代码出现其他错误。我真的试图修复它,但我就是想不通 out.And 抱歉,如果这已经写在某个地方,我也是 Whosebug 的新手,所以我真的不明白 all.Thanks 寻求帮助。 这是错误图片 link->https://imgur.com/MdXs4up

这是代码

package com.example.shromid;
import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class SplashScreen extends AppCompatActivity {
    private static int SPLASH_TIME_OUT=4000;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash_screen);

    new Handler().postDelayed(new Runnable(){
        @Override
        public void run() {
            Intent homeIntent=new Intent(SplashScreen.class,MainActivity.this);
            startActivity(homeIntent);
            finish();
        }
            }SPLASH_TIME_OUT);
            }
    }
}    
new Handler().postDelayed(new Runnable(){
    @Override
    public void run() {
        Intent homeIntent=new Intent(SplashScreen.class,MainActivity.this);
        startActivity(homeIntent);
        finish();
    }
}, SPLASH_TIME_OUT); // See the comma?

您遗漏了匿名 Runnable 定义末尾和处理程序延迟的第二个参数之间的注释。