QuziActivity is not an enclosing class

I am getting the following error “com.example.grady.geoquiz QuziActivity is not an enclosing class” error. I am sure where this is coming from.

package com.example.grady.geoquiz;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class CheatActivity extends AppCompatActivity {

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

        //Start CheatActivity
        Intent intent = new Intent(QuizActivity.this, CheatActivity.class);
        startActivity(intent);
    }
}

Hi Grady,

You can check the following link as a reference.

Please focus on this line in your code. I guess you can solve it by yourself.

Intent intent = new Intent(QuizActivity.this, CheatActivity.class);