I recently upgraded the Glide package to 4.12.0 and I get the following error in one of my activities:
Fatal Exception: java.lang.IllegalArgumentException
You cannot start a load for a destroyed activity
com.bumptech.glide.manager.RequestManagerRetriever.assertNotDestroyed (RequestManagerRetriever.java:13)
From what I read it could be from the way I call glide.with()
so I updated it according to what I saw (in this link) like this:
Glide.with( this )
However, it still crashes.
It crashes inside a firestore .addOnCompleteListener
. Like this:
db.collection( "Items" ).whereEqualTo( "visibility", true ).orderBy( "dateCreated", Query.Direction.DESCENDING ).limit( AppConstants.QUERY_SIZE ).get()
.addOnCompleteListener( task -> {
if (task.isSuccessful()) {
ItemAdapter = new ItemsAdapter( Glide.with( this ) );
ItemAdapter.notifyDataSetChanged();
rv_Items.setAdapter( ItemAdapter );
}
} );
Should it be something else than this
in this case?
Thank you