I am making an android app with java using android studio (SDK 29). Once I go inside the search screen, all the users are displayed. But once I type in the users' nickname, they all disappear, not showing the one that I have searched.
I run the debugger to understand better what is going on and once I type the nickname in the search field, the debugger displays this message:
W/Glide: Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored I/censapplicatio: Compiler allocated 4MB to compile void android.widget.TextView.(android.content.Context, android.util.AttributeSet, int, int) I/AssistStructure: Flattened final assist data: 5580 bytes, containing 1 windows, 23 views W/ExifInterface: Stop reading file since a wrong offset may cause an infinite loop: 0 W/ExifInterface: Stop reading file since a wrong offset may cause an infinite loop: 0 D/ViewRootImpl@7a531ea[UserProfile]: MSG_RESIZED: frame=[0,0][1080,2340] ci=[0,83][0,126] vi=[0,83][0,1003] or=1 W/Glide: Load failed for with size [131x131] class com.bumptech.glide.load.engine.GlideException: Failed to load resource I/censapplicatio: Compiler allocated 4MB to compile void android.view.ViewRootImpl.performTraversals() Disconnected from the target VM, address: 'localhost:8603', transport: 'socket'
Here is the code line where I call Glide into the adapter:
Glide.with(mContext).load(user.getImage()).into(viewHolder.image_profile);
And here is my method SearchUsers():
private void searchUsers(String s){
Query query = FirebaseDatabase.getInstance().getReference("Users").orderByChild("nickname")
.startAt(s)
.endAt(s+"\uf8ff");
query.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
mUsers.clear();
for (DataSnapshot snapshot : dataSnapshot.getChildren()){
User user = snapshot.getValue(User.class);
mUsers.add(user);
}
userAdapter.notifyDataSetChanged();
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
I checked more than 10 possible solutions but none of them worked.
I am not sure if the bug comes from the code itself or any problems related to the dependencies with Glide.