title: Why does my tutorial app crash?
body: <p>I am a beginner making Android apps. Try doing a tutorial and add a Relative layout and a Gridlayout and some Imageviews. But my app crashes.</p>
  
  <p>MainActivity.java</p>
  
  <pre><code>package se.jakobia.connect3;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.ImageView;
  
  public class MainActivity extends AppCompatActivity {
  
  
          public void dropIn(View view) {
  
      ImageView counter =(ImageView)view;
  
      counter.setTranslationY(-1000f);
  
      counter.setImageResource(R.drawable.yellow);
  
      counter.animate().translationYBy(1000f).setDuration(300);
  
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      }
  }
  </code></pre>
  
  <p>and activity_main.xml</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="se.jakobia.connect3.MainActivity"&gt;
  
      &lt;GridLayout
          android:layout_width="match_parent"
          android:layout_height="360dp"
          android:layout_centerVertical="true"
  
  
          android:background="@drawable/board"
          android:columnCount="3"
          android:rowCount="3"&gt;
  
          &lt;ImageView
              android:id="@+id/imageView"
              android:layout_width="90dp"
              android:layout_height="90dp"
              android:layout_column="0"
              android:layout_marginBottom="10dp"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"
              android:layout_marginTop="10dp"
              android:layout_row="0"
              android:src="@drawable/red" /&gt;
  
          &lt;ImageView
              android:id="@+id/imageView2"
              android:layout_width="90dp"
              android:layout_height="90dp"
              android:layout_column="1"
              android:layout_marginBottom="10dp"
              android:layout_marginLeft="40dp"
              android:layout_marginRight="10dp"
              android:layout_marginTop="10dp"
              android:layout_row="0"
              android:src="@drawable/red" /&gt;
  
          &lt;ImageView
              android:id="@+id/imageView3"
              android:layout_width="90dp"
              android:layout_height="90dp"
              android:layout_column="2"
              android:layout_marginBottom="10dp"
              android:layout_marginLeft="30dp"
              android:layout_marginRight="10dp"
              android:layout_marginTop="10dp"
              android:layout_row="0"
              android:src="@drawable/red" /&gt;
  
          &lt;ImageView
              android:id="@+id/imageView4"
              android:layout_width="90dp"
              android:layout_height="90dp"
              android:layout_column="0"
              android:layout_marginLeft="10dp"
              android:layout_marginTop="30dp"
              android:layout_row="1"
              android:src="@drawable/red" /&gt;
  
          &lt;ImageView
              android:id="@+id/imageView5"
              android:layout_width="90dp"
              android:layout_height="90dp"
              android:layout_column="1"
              android:layout_marginLeft="40dp"
              android:layout_marginTop="30dp"
              android:layout_row="1"
              android:onClick="dropIn" /&gt;
  
          &lt;ImageView
              android:id="@+id/imageView6"
              android:layout_width="90dp"
              android:layout_height="90dp"
              android:layout_column="2"
              android:layout_marginLeft="30dp"
              android:layout_marginTop="30dp"
              android:layout_row="1"
              android:src="@drawable/red" /&gt;
  
          &lt;ImageView
              android:id="@+id/imageView7"
              android:layout_width="90dp"
              android:layout_height="90dp"
              android:layout_column="0"
              android:layout_marginLeft="10dp"
              android:layout_marginTop="30dp"
              android:layout_row="2"
              android:src="@drawable/red" /&gt;
  
          &lt;ImageView
              android:id="@+id/imageView8"
              android:layout_width="90dp"
              android:layout_height="90dp"
              android:layout_column="1"
              android:layout_marginLeft="40dp"
              android:layout_marginTop="30dp"
              android:layout_row="2"
              android:src="@drawable/red" /&gt;
  
          &lt;ImageView
              android:id="@+id/imageView9"
              android:layout_width="90dp"
              android:layout_height="90dp"
              android:layout_column="2"
              android:layout_marginLeft="30dp"
              android:layout_marginTop="30dp"
              android:layout_row="2"
              android:src="@drawable/red" /&gt;
  
  
      &lt;/GridLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I got an error message FATAL EXCEPTION: main. And fatal Exceptions main. I don't understand what the error messag means.</p>
  
  <p>I think I haven't done that much, so I don't understand why it is not working.</p>