title: Incompatible Types. Required: java.lang.String[] Found: java.lang.String
body: <p>I'm trying to code an app that can pick the color from a picture selected from a gallery. When coding one of the overrides, I got this message.</p>
  
  <pre><code>Incompatible types.
  
  Required: java.lang.String[]
  
  Found: java.lang.String
  </code></pre>
  
  <p>The code is as follows: </p>
  
  <pre><code>@Override
  protected void onActivity(int requestCode, int resultCode, Intent data) {
      if (requestCode == RESULT_LOAD_IMAGE &amp;&amp; resultCode == RESULT_OK &amp;&amp; null !=data) {
          Uri selectedImage = data.getData();
          String[] filePathColumn = (MediaStore.Images.Media.DATA);
          Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);
          cursor.moveToFirst();
          int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
      }
  }
  </code></pre>
  
  <p>The problem occurs in this <code>onActivity</code> method. How do I fix this error?</p>