title: Cannot use Android Crop image crop library in Android
body: <p>I am developing an Android project. In my project, I want to add crop image feature. So I used this library, <a href="https://github.com/jdamcd/android-crop" rel="nofollow noreferrer">https://github.com/jdamcd/android-crop</a>. But when I use it. It is giving me error.</p>
  
  <p><strong>This is how I installed:</strong></p>
  
  <ol>
  <li><p>I put this in grandle, compile 'com.soundcloud.android:android-crop:1.0.1@aar'</p></li>
  <li><p>I put this in manifest file, </p></li>
  </ol>
  
  <p><strong>This is how I am using in code:</strong></p>
  
  <ol>
  <li><p>I open Image picker like this</p>
  
  <p><code>Crop.pickImage(CurrentActivity.this, IMAGE_CHOOSER_REQUEST_COODE);</code></p></li>
  <li><p>In onActivityResult, I am doing like this</p>
  
  <pre><code>@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if(requestCode==IMAGE_CHOOSER_REQUEST_COODE &amp;&amp; resultCode == RESULT_OK)
      {
          Crop.of(data.getData(),null).asSquare().start(CreateItemActivity.this);
      }
      else if(requestCode == Crop.REQUEST_CROP &amp;&amp; resultCode == RESULT_OK)
      {
          Uri filePath = data.getData();
      }
  }
  </code></pre></li>
  <li><p>But after I crop the image and I click "OK", the result of the activity is not equal to OK. So I cannot retrieve cropped image data.</p>
  
  <p>So I removed <code>resultCode==RESULT_OK</code> and I retrieved like this:</p>
  
  <pre><code> if(requestCode == Crop.REQUEST_CROP)
   {
       Uri filePath = data.getData();
   }
  </code></pre></li>
  </ol>
  
  <p>Data is always null. What is wrong with my code and how can I fix it?</p>