title: Android - ClassCastException when using R.id.resource
body: <p>The errors says that im trying to cast a TextView into a Button, but I dont see anything wrong with my code</p>
  
  <p>XML:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/bg_grass"
  tools:context=".Game3Activity" &gt;
  
  &lt;ImageView
      android:id="@+id/imageView3"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:contentDescription="@string/junk"
      android:src="@drawable/bg_woodslab" /&gt;
  
  &lt;ImageView
      android:id="@+id/game3_q1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:contentDescription="@string/junk"
      android:src="@drawable/btn_picturehole" /&gt;
  &lt;TextView
      android:id="@+id/game3_q2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBottom="@id/imageView3"
      android:layout_centerHorizontal="true"
      android:background="@drawable/btn_wordhole"    
      android:gravity="center"
      android:textSize="20sp" /&gt;
  &lt;Button
      android:id="@+id/game3_choice2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerHorizontal="true"
      android:layout_marginBottom="74dp"
      android:contentDescription="@string/junk"/&gt;
  
  &lt;Button
      android:id="@+id/game3_choice1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBaseline="@id/game3_choice2"
      android:layout_alignBottom="@id/game3_choice2"
      android:layout_toLeftOf="@id/game3_choice2"
      android:contentDescription="@string/junk"/&gt;
  
  &lt;Button
      android:id="@+id/game3_choice3"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBaseline="@id/game3_choice2"
      android:layout_alignBottom="@id/game3_choice2"
      android:layout_toRightOf="@id/game3_choice2"
      android:contentDescription="@string/junk"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>Java onCreate function:</p>
  
  <pre><code>image = (ImageView)findViewById(R.id.game3_q1);
  textview = (TextView)findViewById(R.id.game3_q2);
  </code></pre>
  
  <p>Variables were already initialized as private variables (private ImageView image)etc 
  The app immediately crashes after I try to set the imageview. Any solutions?</p>