一段时间以来,我一直在尝试使用毕加索从Firebase数据库加载图像,但相同的错误不断出现。 图像已成功保存到firease数据库中,但在imageview后面加载了黑色背景..这是logcat中显示的错误...
java.lang.IllegalStateException: Unrecognized type of request: Request{com.google.android.gms.tasks.zzu@f30b587}
如何解决此错误? 请帮助.........
setup_activity:
Save.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
saveusersetupinfirmation();
}
});
profileimage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent galleryIntent = new Intent();
galleryIntent.setAction(Intent.ACTION_GET_CONTENT);
galleryIntent.setType("image/*");
startActivityForResult(galleryIntent, GALLARY_PICK);
}
});
userRef.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
String image = dataSnapshot.child("profileimage").getValue(String.class);
Picasso.get()
.load(image)
.placeholder(R.drawable.profile)
.into(profileimage, new Callback() {
@Override
public void onSuccess() {
}
@Override
public void onError(Exception e) {
System.out.println(e);
Log.d("BFIT1", String.valueOf(e));
e.printStackTrace();
Toast.makeText(SetupActivity.this,"Error!",Toast.LENGTH_SHORT).show();
}
});
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}