Glide FileNotFoundException: No content provider when loading images from internet

后端 未结 3 815
无人及你
无人及你 2021-02-19 03:14

I made my own rest api and now it just has endpoint where I show some images. Here how it looks in spring boot application

@GetMapping(\"/image/{name:.+}\")
             


        
3条回答
  •  我寻月下人不归
    2021-02-19 03:48

    If you are targeting API 28 on and the issue appears on Android 9 and the URL starting with http your issue is with cleartext traffic as mentioned here in Network security configuration

    Starting with Android 9.0 (API level 28), cleartext support is disabled by default.

    ensure that all connections to are always done over HTTPS to protect sensitive traffic from hostile networks.

    If you want to Opt out of cleartext traffic

    Add this property on your application manifests only

    
    
     
    

    And if you want to have specific domains to have the rule

    Create file res/xml/network_security_config.xml

    
    
        
        secure.example.com
    
    
    

    AndroidManifest.xml -

    
    
        
        
            ...
        
    
    

提交回复
热议问题