title: Failure delivering result ResultInfo when trying to choose an image
body: <p>I am trying to make an application for my final year project.</p>
  
  <p>I have created this activity which has - upload and choose buttons.</p>
  
  <p>Found where the problem occurs - in my onActivityResult function on the highlighted line : </p>
  
  <pre><code>protected void onActivityResult(int requestCode, int resultCode, Intent data){
      super.onActivityResult(requestCode,resultCode, data);
  
       if(requestCode == PICK_IMAGE_REQUEST &amp;&amp; resultCode == RESULT_OK
          &amp;&amp; data != null &amp;&amp; data.getData() != null){
  
          mImageUri = data.getData();
  </code></pre>
  
  <p>Picasso.with(this).load(mImageUri).into(mImageView);</p>
  
  <pre><code>    }
  
  }
  </code></pre>
  
  <p>There was no information that could help me on the internet.</p>
  
  <p><strong>I am getting these errors when choosing an image from gallery along with the application crash</strong>:</p>
  
  <pre><code>  java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:25 flg=0x1 }} to activity {com.example.user.alphaver/com.example.alphaver.ProfileActivity}: java.lang.IllegalArgumentException: Target must not be null.
      at android.app.ActivityThread.deliverResults(ActivityThread.java:4845)
      at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886)
      at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
      at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
      at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
      at android.os.Handler.dispatchMessage(Handler.java:107)
      at android.os.Looper.loop(Looper.java:214)
      at android.app.ActivityThread.main(ActivityThread.java:7356)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
   Caused by: java.lang.IllegalArgumentException: Target must not be null.
      at com.squareup.picasso.RequestCreator.into(RequestCreator.java:618)
      at com.squareup.picasso.RequestCreator.into(RequestCreator.java:601)
      at com.example.alphaver.ProfileActivity.onActivityResult(ProfileActivity.java:130)
      at android.app.Activity.dispatchActivityResult(Activity.java:8110)
      at android.app.ActivityThread.deliverResults(ActivityThread.java:4838)
      at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886) 
      at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51) 
      at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
      at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) 
      at android.os.Handler.dispatchMessage(Handler.java:107) 
      at android.os.Looper.loop(Looper.java:214) 
      at android.app.ActivityThread.main(ActivityThread.java:7356) 
      at java.lang.reflect.Method.invoke(Native Method) 
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
  </code></pre>
  
  <p>also the file choosing function: </p>
  
  <pre><code>private void openFileChooser(){
      Intent intent = new Intent();
      intent.setType("image/*");
      intent.setAction(Intent.ACTION_GET_CONTENT);
      startActivityForResult(intent, PICK_IMAGE_REQUEST);
  }
  </code></pre>
  
  <p>I am looking to solve the problem of crashing, I need to choose the image and display it on my ImageView.</p>
  
  <p>**</p>
  
  <blockquote>
    <p>Update: Solution - update firebase implementations</p>
  </blockquote>
  
  <p>**</p>