error: non-static method show() cannot be referenced from a static context DatePickerDialog.show();

error: non-static method show() cannot be referenced from a static context DatePickerDialog.show();

我正在使用本教程 (youtube link https://www.youtube.com/watch?v=AdTzD96AhE0) 在我的应用程序中开发一个日期选择器对话框,其中我通过使用日期文本从用户那里获取输入应用日期选择器对话框,它也显示在同一个 editText(editText id "editTextDate" ) 上。我收到一条错误消息,指出无法从静态上下文中引用非静态方法 show() DatePickerDialog.show();\ 我该怎么做????

这是我的全部代码

public class Match_Details extends AppCompatActivity implements DatePickerDialog.OnDateSetListener {

    private TextView dateText;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_match__details);
        dateText = findViewById(R.id.editTextDate);

        findViewById(R.id.editTextDate).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View V) {
            }
        });
    }
    private void showDatePickerDailog(){
            DatePickerDialog datePickerDialog= new DatePickerDialog(
                    this,
                    this,
                    Calendar.getInstance().get(Calendar.YEAR),
                    Calendar.getInstance().get(Calendar.MONTH),
                    Calendar.getInstance().get(Calendar.DAY_OF_MONTH)
            );
            DatePickerDialog.show();
    }

    @Override
    public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
        String date= dayOfMonth +"/"+ month +"/"+ year;
        dateText.setText(date);
    }
} 

部分XML代码

<EditText
        android:id="@+id/editTextDate"
        android:layout_width="158dp"
        android:layout_height="46dp"
        android:layout_marginTop="180dp"
        android:autoLink="phone"
        android:ems="10"
        android:hint="@string/date"
        android:inputType="date"
        android:textAlignment="center"
        app:layout_constraintEnd_toStartOf="@+id/editTextTime"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@+id/button" />
datePickerDialog.show();

你应该将它引用到一个实例,而不是 Class。