Profile image not showing after saving(it just shows blank white screen)

前端 未结 3 1032
挽巷
挽巷 2020-12-12 04:54

I am trying to upload user profile image and store in firebase.My image successfully stores in firebase storage and in the user database.

When I upload the image it

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-12 05:32

    You are getting the following error:

    Load failed for com.google.android.gms.tasks.zzu@c0645c1

    Because you are trying to display an image that does not exist. As I see in your database, the profileImageUrl property holds an image url that is not valid.

    See the red line? What it actually holds is the address of an object from the memory and not an image url. This is happening because you are calling toString() method on the downloadUrl object. So the way you are get the donwload url is not correct. This is the correct way for getting the url. Once you get url of the image and you add it to the database and everything will work as expected.

提交回复
热议问题