'Error: Unexpected implicit cast to `ConstraintLayout`: layout tag was `TextView`

It seems like there are a lot of questions regarding TextView and such but I am completely new to coding. I am working in Java language in Android Studio trying to make an app, I am doing this by following another persons instructions on YT, they do not get this error.

Here is the code:

package com.example.soudsrestautantcuisine;

import...

public class IntroActivity extends AppCompatActivity {
    private ConstraintLayout startBtn;

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

        startBtn=findViewById(R.id.startBtn);

This code is not finished but I get the error at this last line here regardless of whether the whole code is written.

May somebody please help me ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source