使用开源视频缓存库AndroidVideoCache com.danikula.videocache.ProxyCacheException

                                                          com.danikula.videocache.ProxyCacheException: Error pinging server (attempts: 3, max timeout: 280). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: [DIRECT]. Version: 2.7.0
                                                              at com.danikula.videocache.Pinger.ping(Pinger.java:73)
                                                              at com.danikula.videocache.HttpProxyCacheServer.isAlive(HttpProxyCacheServer.java:183)
                                                              at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:120)
                                                              at com.danikula.videocache.HttpProxyCacheServer.getProxyUrl(HttpProxyCacheServer.java:101)
                                                              

 Android 9.0及以上的机器,报如上错误。

解决:res的xml文件夹下定义一个network_security_config.xml文件,内容如下

     

          127.0.0.1

     

     

         

             

     

在AndroidManifest.xml的中加入该配置

 

亲测可行。

你可能感兴趣的:(Android疑难杂症,Android视频缓存)