Cannot resolve Methods (Beginner issue in Android Studio (java))
<p>I am following a tutorial in how to set up a Surface View in Android Studio using Java. This is my code:</p>

<pre><code>package com.example.benjamin.labb3;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.SurfaceHolder;

public class SurfaceView extends Activity {

    private OurView v;

    @Override
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(v);
        v = new OurView(this);
    }

    @Override
    protected void onPause() {
        super.onPause();
        v.pause();
    }

    @Override
    protected void onResume() {
        super.onResume();
        v.resume();
    }

    public class OurView extends SurfaceView implements Runnable {

        Thread t = null;
        SurfaceHolder holder;
        boolean isOk = false;

        public OurView(Context context){
            super(context);
            holder = getHolder();
        }

        public void run(){
            if(isOk){

            }
        }

        public void pause(){
            isOk = false;
            while (true){
                try {
                    t.join();
                    t = null;
                    break;
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }

        public void resume(){
            isOk = true;
            t = new Thread(this);
            t.start();
        }
    }
}
</code></pre>

<p>In</p>

<pre><code>setContentView(v);
</code></pre>

<p>I am getting the error msg:</p>

<blockquote>
  <p>"Cannot resolve method
  setContentView(com.example.ben3.pl2.SurfaceView.OurView)"</p>
</blockquote>

<p>And in</p>

<pre><code>  public OurView(Context context){
    super(context);
    holder = getHolder();
}
</code></pre>

<p>I am getting the errors:</p>

<blockquote>
  <p>"Cannot resolve method super(android.content.Context)"</p>
  
  <p>"Cannot resolve method getHolder()"</p>
</blockquote>

<p>Can anyone help me? The tutorial is from 2011 so it could have something to do with them having a older version of AS, or i just missed something perhaps.</p>