Glide not loading real image and stuck with placeholder

后端 未结 11 729
长情又很酷
长情又很酷 2021-02-02 05:59

I have a pretty basic load image from server line code:

Glide.with(view.getContext()).load(url).placeholder(R.drawable.default_profile).into(view);
11条回答
  •  北海茫月
    2021-02-02 06:20

    May help someone :) My issue was network security policy exception. The URL requested by Glide was blocked by android due to security policy.

    Fixed by whitelisting desired domain. Check here

    com.bumptech.glide.load.engine.GlideException: Failed to load resource
    There was 1 cause:
    java.net.UnknownServiceException(CLEARTEXT communication to maps.googleapis.com not permitted by the network security policy)
     call GlideException#logRootCauses(String) for more detail
    

    The toughest thing is it was not shown in the normal log.

提交回复
热议问题