title: Android Glide Library - Argument must not be null
body: <p>I have a recyclerView. When I click on a item in the Recyclerview, I want to add a picture to the imageview in my activity. I try using Glide and it doesn't. I get this error: Argument must not be null. I think the problem is: imageView is not in Recyclerview. That's why I can't access Imageview from my Adapter class. How do I fix this?</p>
  
  <p><strong>Adapter Class</strong></p>
  
  <p>NOTE: imageView is not in Recyclerview.</p>
  
  <pre><code>     public ViewHolder(@NonNull View itemView) {
                super(itemView);
  
                image= itemView.findViewById(R.id.imageView);
                imageViews =  itemView.findViewById(R.id.cards);
                imageViews.setOnClickListener(this);
            }
  
  
   @Override
          public void onClick(View v) {
              if(v == imageViews){
                   Glide.with((MainActivity)context).load(R.drawable.picture).fitCenter().into(image);
              }
  
          }
  </code></pre>
  
  <p><strong>main activity XML</strong></p>
  
  <pre><code>            &lt;androidx.recyclerview.widget.RecyclerView
                  android:id="@+id/RecyclerView"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
  android:scaleType="fitXY"&gt;
  &lt;/androidx.recyclerview.widget.RecyclerView&gt;
  
    &lt;ImageView
          android:id="@+id/imageView"
          android:layout_width="80dp"
          android:layout_height="125dp"
        app:srcCompat="@drawable/examplePicture" /&gt;
  </code></pre>
  
  <p><strong>LOGCAT</strong></p>
  
  <pre><code>java.lang.NullPointerException: Argument must not be null
          at com.bumptech.glide.util.Preconditions.checkNotNull(Preconditions.java:31)
          at com.bumptech.glide.util.Preconditions.checkNotNull(Preconditions.java:25)
          at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:685)
          at com.example.android.TarotModule.CustomAdapter$ViewHolder.onClick(CustomAdapter.java:82)
          at android.view.View.performClick(View.java:5156)
          at android.view.View$PerformClick.run(View.java:20755)
          at android.os.Handler.handleCallback(Handler.java:739)
          at android.os.Handler.dispatchMessage(Handler.java:95)
          at android.os.Looper.loop(Looper.java:145)
  </code></pre>